model-0.2: Derive a model of a data type using Generics
Data.Model.Env
Description
Environment used while capturing model
Synopsis
type State s = StateT s Identity #
A state monad parameterized by the type s of the state to carry.
s
The return function leaves the state unchanged, while >>= uses the final state of the first computation as the initial state of the second.
return
>>=
data Env Source #
Instances
Methods
showsPrec :: Int -> Env -> ShowS #
show :: Env -> String #
showList :: [Env] -> ShowS #
withEnv :: State Env HType -> HTypeModel Source #
Run the model capturing computation
enterCtx :: QualName -> State Env Bool Source #
Enter a type
addDef :: QualName -> HADT -> State Env () Source #
Add a new data type model to the environment
closeCtx :: State Env () Source #
Leave current type