Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Language.HM.Term
Description
This module contains the abstract syntax tree of the term language.
- type Var = String
- data TermF v r
- type Term = Fix (TermF Var)
- varE :: Var -> Term
- appE :: Term -> Term -> Term
- absE :: Var -> Term -> Term
- letE :: Var -> Term -> Term -> Term
- data Typed t a = Typed {}
- type TyVar = Typed Sigma Var
- newtype TypedF t f r = TypedF {}
- type TyTerm = Fix (TypedF Tau (TermF TyVar))
- tyVarE :: TyVar -> Tau -> TyTerm
- tyAppE :: TyTerm -> TyTerm -> Tau -> TyTerm
- tyAbsE :: TyVar -> TyTerm -> Tau -> TyTerm
- tyLetE :: TyVar -> TyTerm -> TyTerm -> Tau -> TyTerm
Documentation
Things with type annotations.
tyVarE :: TyVar -> Tau -> TyTerm Source
tyVarE
x t
constructs a variable whose name is x
and whose type is
t
.
tyAppE :: TyTerm -> TyTerm -> Tau -> TyTerm Source
tyAppE
l r t
constructs an application of l
to r
whose resulting
type is t
.