hermit-0.6.0.0: Haskell Equational Reasoning Model-to-Implementation Tunnel

Safe HaskellNone
LanguageHaskell2010

HERMIT.Shell.Interpreter

Contents

Synopsis

The HERMIT Interpreter

data Interp :: (* -> *) -> * -> * Source

An Interp cmd is a possible means of converting a Typeable value to a value of type cmd.

Instances

Monad m => Functor (Interp m) 

interp :: (Monad m, Typeable b) => (b -> a) -> Interp m a Source

An Interp with no effects.

interpM :: (CLMonad m, Typeable b) => (b -> m a) -> Interp m a Source

An Interp which can affect the shell.

interpEM :: (CLMonad m, Typeable b) => (b -> ExprH -> m a) -> Interp m a Source

Like InterpM, but with access to the original expression.

interpExprH :: CLMonad m => [Interp m b] -> ExprH -> m b Source

Execute an ExprH using a given interpreter. The given interpretations are tried in order. The first one to match (have the proper type) will be executed.