model-0.2.1: Derive a model of a data type using Generics

Safe HaskellSafe
LanguageHaskell2010

Data.Model.Env

Description

Environment used while capturing model

Synopsis

Documentation

type State s = StateT s Identity #

A state monad parameterized by the type s of the state to carry.

The return function leaves the state unchanged, while >>= uses the final state of the first computation as the initial state of the second.

data Env Source #

Environment used while capturing model

Instances

Show Env Source # 

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