Monatron-0.3.1: Monad transformer library with uniform liftings
Control.Monatron.ZipperExamples
fmask :: (m :><: n) -> Open e f (n a) -> Open e f (m a)Source
type Env = [(String, Int)]Source
type Count = IntSource
data Mem e Source
Constructors
Instances
type Reg = IntSource
evalMem2 :: (StateM Reg (t m), StateM Count m, MonadT t) => Open e Mem (t m Int)Source
type M4 = StateT Reg (StateT Env (ExcT String (StateT Count Id)))Source
data Lit a Source
data Var a Source
data Add e Source
lit :: Lit :<: g => Int -> Fix gSource
var :: Var :<: g => String -> Fix gSource
add :: Add :<: g => Fix g -> Fix g -> Fix gSource
store :: Mem :<: g => Fix g -> Fix gSource
retrieve :: Mem :<: g => Fix gSource
type Expr3 = Fix (Mem :+: (Var :+: Lit))Source
eval4 :: Expr3 -> M4 IntSource
handleExc :: Monad m => ExcT a m b -> m bSource