Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Variable a
- data Let a where
- data HOLambda dom p pVar a where
- type HODomain dom p pVar = (HOLambda dom p pVar :+: ((Variable :|| pVar) :+: dom)) :|| p
- type FODomain dom p pVar = (CLambda pVar :+: ((Variable :|| pVar) :+: dom)) :|| p
- type CLambda pVar = SubConstr2 (->) Lambda pVar Top
- class IsHODomain dom p pVar | dom -> p pVar where
- reifyM :: forall dom p pVar m a. MonadState VarId m => AST (HODomain dom p pVar) a -> m (AST (FODomain dom p pVar) a)
- reifyTop :: AST (HODomain dom p pVar) a -> AST (FODomain dom p pVar) a
- reify :: (Syntactic a, Domain a ~ HODomain dom p pVar) => a -> ASTF (FODomain dom p pVar) (Internal a)
Documentation
Variables
Instances
StringTree Variable Source # | |
Defined in Language.Syntactic.Constructs.Binding | |
Render Variable Source # | |
Equality Variable Source # |
|
Constrained Variable Source # | |
EvalBind Variable Source # | |
Optimize Variable Source # | |
(AlphaEq dom dom dom env, VarEqEnv env) => AlphaEq Variable Variable dom env Source # | |
IsHODomain (HODomain dom p pVar) p pVar Source # | |
type Sat Variable Source # | |
Defined in Language.Syntactic.Constructs.Binding |
Let binding
Let
is just an application operator with flipped argument order. The argument
(a -> b)
is preferably constructed by Lambda
.
Instances
StringTree Let Source # | |
Defined in Language.Syntactic.Constructs.Binding | |
Render Let Source # | |
Eval Let Source # | |
Defined in Language.Syntactic.Constructs.Binding evaluate :: Let a -> Denotation a Source # | |
Equality Let Source # | |
Constrained Let Source # | |
EvalBind Let Source # | |
Optimize Let Source # | |
AlphaEq dom dom dom env => AlphaEq Let Let dom env Source # | |
type Sat Let Source # | |
Defined in Language.Syntactic.Constructs.Binding |
data HOLambda dom p pVar a where Source #
Higher-order lambda binding
type HODomain dom p pVar = (HOLambda dom p pVar :+: ((Variable :|| pVar) :+: dom)) :|| p Source #
Adding support for higher-order abstract syntax to a domain
type FODomain dom p pVar = (CLambda pVar :+: ((Variable :|| pVar) :+: dom)) :|| p Source #
Equivalent to HODomain
(including type constraints), but using a first-order representation
of binding
type CLambda pVar = SubConstr2 (->) Lambda pVar Top Source #
Lambda
with a constraint on the bound variable type
class IsHODomain dom p pVar | dom -> p pVar where Source #
An abstraction of HODomain
reifyM :: forall dom p pVar m a. MonadState VarId m => AST (HODomain dom p pVar) a -> m (AST (FODomain dom p pVar) a) Source #
reifyTop :: AST (HODomain dom p pVar) a -> AST (FODomain dom p pVar) a Source #
Translating expressions with higher-order binding to corresponding expressions using first-order binding
reify :: (Syntactic a, Domain a ~ HODomain dom p pVar) => a -> ASTF (FODomain dom p pVar) (Internal a) Source #
Reify an n-ary syntactic function