language-pts-0: Pure Type Systems

Safe HaskellNone
LanguageHaskell2010

Language.PTS.Quote

Description

Quotation.

Take a Value back to Term.

Or more precisely

Unlike LambdaPi, our Value has Eq instance. Therefore we don't need quotation for type-checker. It's sometimes useful anyway.

>>> t <- type_ emptyCtx systemfIdentity >>= errorlessValueIntro' . snd
>>> prettyPut t
∀ a → a → a
>>> :t t
t :: ValueIntro Void SystemF Sym
>>> prettyPut (quote_ t)
∀ a → a → a
>>> :t quote_ t
quote_ t :: TermChk SystemF Sym
>>> t' <- check_ emptyCtx (quote_ t) (sort_ SysFStar) >>= errorlessValueIntro'
>>> prettyPut t'
∀ a → a → a

Documentation

class Quote v t | v -> t, t -> v where Source #

Minimal complete definition

quote_

Methods

quote_ :: Specification s => v Void s a -> t s a Source #

Instances
Quote ValueElim TermInf Source # 
Instance details

Defined in Language.PTS.Quote

Methods

quote_ :: Specification s => ValueElim Void s a -> TermInf s a Source #

Quote ValueIntro TermChk Source # 
Instance details

Defined in Language.PTS.Quote

Methods

quote_ :: Specification s => ValueIntro Void s a -> TermChk s a Source #