| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Rzk.Check.Decl
Description
Declarations, commands and the module driver.
A top-level entry is a name bound in the outermost scope, so the scope
grows as a module is checked: each #define, #postulate and #assume
enters a binder and the rest of the module is checked under it. The
driver is written in continuation-passing style, and the result is
packaged with the scope it was produced in.
A section (and a module, which is an anonymous section) is closed by
abstracting its definitions over the assumptions they use. The
dependencies are read off the elaborated Core each top-level entry
keeps, as the old checker read them off its terms (Rzk.TypeCheck.Decl).
#data is not covered yet: such a command is reported and skipped.
Synopsis
- data Decl (n :: S) = Decl {
- declName :: VarIdent
- declNameOf :: Name n
- declType :: Value n
- declValue :: Maybe (Value n)
- declLocation :: Maybe LocationInfo
- checkModules :: forall (n :: S) r. Distinct n => [(FilePath, Module)] -> (forall (l :: S). (DExt n l, Distinct l) => [(FilePath, [Decl l])] -> [ErrorInContext] -> Check l r) -> Check n r
- resolveNames :: forall (n :: S). Distinct n => Term -> Check n (Raw n)
Documentation
A top-level declaration, as checked.
Constructors
| Decl | |
Fields
| |
checkModules :: forall (n :: S) r. Distinct n => [(FilePath, Module)] -> (forall (l :: S). (DExt n l, Distinct l) => [(FilePath, [Decl l])] -> [ErrorInContext] -> Check l r) -> Check n r Source #
Check a list of modules, one after another, in a scope that grows as it goes. Checking stops at the first module with an error.