Safe Haskell | None |
---|---|
Language | Haskell2010 |
Control.Monad.Free.Foil
Description
This module defines a variation of free scoped (relative) monads relying on the foil for the scope-safe efficient handling of the binders.
See description of the approach in «Free Foil: Generating Efficient and Scope-Safe Abstract Syntax».
Documentation
data ScopedAST (sig :: Type -> Type -> Type) (n :: S) where Source #
Scoped term under a (single) name binder.
data AST (sig :: Type -> Type -> Type) (n :: S) where Source #
A term, generated by a signature Bifunctor
sig
,
with (free) variables in scope n
.
Constructors
Var :: forall (n :: S) (sig :: Type -> Type -> Type). Name n -> AST sig n | A (free) variable in scope |
Node :: forall (sig :: Type -> Type -> Type) (n :: S). sig (ScopedAST sig n) (AST sig n) -> AST sig n | A non-variable syntactic construction specified by the signature |