morte-1.0.0: Bare-bones calculus-of-constructions

Safe HaskellSafe-Infered

Morte

Contents

Description

A bare-bones calculus-of-constructions

Synopsis

Types

data Const

Constants

Constructors

Star 
Box 

data Expr

Higher-order abstract syntax tree for expressions

Constructors

Const Const 
Var Int 
Lam Expr (Expr -> Expr) 
Pi Expr (Expr -> Expr) 
App Expr Expr 

Instances

Functions

typeOf :: Expr -> Either Text Expr

Type-check an expression and return the expression's type

normalize :: Expr -> Expr

Reduce an expression to normal form

pretty :: Expr -> Text

Pretty-print an expression as lazy Text