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

Rzk.Check.Display

Description

Showing a term to the user: the names of a context, and a core term back to surface syntax under them.

A term of the core names its variables by Name, so anything user-facing has to say what each name is called: a Naming gives a display name per name in scope and a supply of fresh names for the binders the printer meets. A binder inside the term is freshened only against the names the term mentions, so a type shows the binder it was written with. This follows the display naming of the old checker (Rzk.TypeCheck.Display).

Synopsis

Documentation

data Naming (n :: S) Source #

What every name in scope is called, and what the printer may call the binders it has yet to meet.

Constructors

Naming 

Fields

namingOfContext :: forall (n :: S). Context n -> Naming n Source #

Read the naming off a context: a named entry keeps its name, refreshed if an outer one has taken it; an anonymous one draws from the supply. Entries are named oldest binding first, so an outer binder keeps its name and an inner one is refreshed away from it.

displayOf :: forall (n :: S). Naming n -> Name n -> VarIdent Source #

ppName :: forall (n :: S). Naming n -> Name n -> String Source #

renderCore :: forall (n :: S). Distinct n => Naming n -> Core n -> Term Source #

A core term as surface syntax, with the context's names.

ppCore :: forall (n :: S). Distinct n => Naming n -> Core n -> String Source #

ppValue :: forall (n :: S). Distinct n => Scope n -> Context n -> Value n -> String Source #

A value shown to the user: read back with defined names folded.

ppValueIn :: forall (n :: S). Distinct n => Context n -> Value n -> String Source #