symantic-6.3.0.20170807: Library for Typed Tagless-Final Higher-Order Composable DSL

Safe HaskellSafe
LanguageHaskell2010

Language.Symantic.Interpreting.Eval

Contents

Description

Interpreter to evaluate a term as a host-term.

Synopsis

Type Eval

newtype Eval a Source #

Interpreter's data.

Constructors

Eval 

Fields

Instances

Monad Eval Source # 

Methods

(>>=) :: Eval a -> (a -> Eval b) -> Eval b #

(>>) :: Eval a -> Eval b -> Eval b #

return :: a -> Eval a #

fail :: String -> Eval a #

Functor Eval Source # 

Methods

fmap :: (a -> b) -> Eval a -> Eval b #

(<$) :: a -> Eval b -> Eval a #

Applicative Eval Source # 

Methods

pure :: a -> Eval a #

(<*>) :: Eval (a -> b) -> Eval a -> Eval b #

(*>) :: Eval a -> Eval b -> Eval b #

(<*) :: Eval a -> Eval b -> Eval a #

Sym_Lambda Eval Source # 

Methods

apply :: Eval ((a -> b) -> a -> b) Source #

app :: Eval (a -> b) -> Eval a -> Eval b Source #

lam :: (Eval a -> Eval b) -> Eval (a -> b) Source #

let_ :: Eval var -> (Eval var -> Eval res) -> Eval res Source #

lam1 :: (Eval a -> Eval b) -> Eval (a -> b) Source #

qual :: proxy q -> Eval t -> Eval (q #> t) Source #

eval :: Eval a -> a Source #

Interpreter.

Constructors

eval0 :: a -> Eval a Source #

eval1 :: (a -> b) -> Eval a -> Eval b Source #

eval2 :: (a -> b -> c) -> Eval a -> Eval b -> Eval c Source #

eval3 :: (a -> b -> c -> d) -> Eval a -> Eval b -> Eval c -> Eval d Source #