Safe Haskell | None |
---|---|
Language | Haskell2010 |
Comments
- LambdaPi paper doesn't tell why values are divided into neutral terms
and a lambda abstraction. Frank Pfenning's lecture notes give another
explation. Values (neutral terms) (
) are introduced, or they meet with elimination forms (Value
~ValueIntro
ValueElim
) which are extracted from a hypothesis. https://www.cs.cmu.edu/~fp/courses/atp/handouts/ch3-seqcalc.pdf - In LambdaPi paper only \(Term\uparrow\) (inferred) are substituted.
Therefore we have
. However binding forms close over \(Term\downarrow\), we wrap them inScope
TermInf
TermChkT
, and use Bound.ScopeT to make all that look simple. Noteworthy is the fact, thatTermChk
is not aMonad
, butTermChkT
is aBound
. - Language.PTS.Smart defines small DSL to write terms in Haskell
(Haskell as a meta-language!). We rely on
FunctionalDependencies
to make combinators work forTerm
andValue
. Similar idea is used in thelucid_
package.
Synopsis
- module Language.PTS.Term
- module Language.PTS.Value
- module Language.PTS.Sym
- module Language.PTS.Error
- module Language.PTS.Check
- module Language.PTS.Quote
- module Language.PTS.Specification
- module Language.PTS.Smart
- module Language.PTS.Script
- module Language.PTS.WHNF
- demo_ :: forall s. Specification s => (Sym -> Maybe (Value s)) -> Term s -> IO ()
Terms and values (and symbols and errors)
module Language.PTS.Term
module Language.PTS.Value
module Language.PTS.Sym
module Language.PTS.Error
type-check, eval, quote
module Language.PTS.Check
module Language.PTS.Quote
PTS specification
module Language.PTS.Specification
DSL for terms and values
module Language.PTS.Smart
module Language.PTS.Script
WHNF is an example "evaluator"
module Language.PTS.WHNF