Safe Haskell | None |
---|
- data HermitM a
- runHM :: HermitMEnv -> DefStash -> (DefStash -> a -> CoreM b) -> (String -> CoreM b) -> HermitM a -> CoreM b
- liftCoreM :: CoreM a -> HermitM a
- newIdH :: String -> Type -> HermitM Id
- newTyVarH :: String -> Kind -> HermitM TyVar
- cloneVarH :: (String -> String) -> Var -> HermitM Var
- type Label = String
- type DefStash = Map Label CoreDef
- saveDef :: Label -> CoreDef -> HermitM ()
- lookupDef :: Label -> HermitM CoreDef
- getStash :: HermitM DefStash
- newtype HermitMEnv = HermitMEnv {
- hs_debugChan :: DebugMessage -> HermitM ()
- data DebugMessage
- mkHermitMEnv :: (DebugMessage -> HermitM ()) -> HermitMEnv
- sendDebugMessage :: DebugMessage -> HermitM ()
The HERMIT Monad
The HERMIT monad is kept abstract.
runHM :: HermitMEnv -> DefStash -> (DefStash -> a -> CoreM b) -> (String -> CoreM b) -> HermitM a -> CoreM bSource
Eliminator for HermitM
.
newIdH :: String -> Type -> HermitM IdSource
Make a unique identifier for a specified type based on a provided name.
newTyVarH :: String -> Kind -> HermitM TyVarSource
Make a unique type variable for a specified kind based on a provided name.
cloneVarH :: (String -> String) -> Var -> HermitM VarSource
This gives an new version of a Var
, with the same info, and a new textual name.
Saving Definitions
Messages
newtype HermitMEnv Source
A way of sending messages to top level
HermitMEnv | |
|
mkHermitMEnv :: (DebugMessage -> HermitM ()) -> HermitMEnvSource
sendDebugMessage :: DebugMessage -> HermitM ()Source