rzk-0.11.4: An experimental proof assistant for synthetic ∞-categories
Safe HaskellNone
LanguageHaskell2010

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

Documentation

data Decl (n :: S) Source #

A top-level declaration, as checked.

Constructors

Decl 

Fields

Instances

Instances details
Sinkable Decl Source # 
Instance details

Defined in Rzk.Check.Decl

Methods

sinkabilityProof :: forall (n :: S) (l :: S). (Name n -> Name l) -> Decl n -> Decl l #

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.

resolveNames :: forall (n :: S). Distinct n => Term -> Check n (Raw n) Source #

Resolve surface names and convert a term to raw syntax. A known identifier resolves to its scoped name; an unknown one is marked for the type checker to report where it is used. Type elaboration happens later in check or infer.