Maintainer | bastiaan.heeren@ou.nl |
---|---|
Stability | provisional |
Portability | portable (depends on ghc) |
Safe Haskell | None |
Language | Haskell98 |
State monad for environments
- data EnvMonad a where
- getRef :: Typeable a => Ref a -> EnvMonad a
- updateRefs :: MonadPlus m => [EnvMonad a] -> Environment -> m Environment
- runEnvMonad :: EnvMonad a -> Environment -> [(a, Environment)]
- execEnvMonad :: EnvMonad a -> Environment -> [Environment]
- evalEnvMonad :: EnvMonad a -> Environment -> [a]
- envMonadRefs :: EnvMonad a -> [Some Ref]
- envMonadFunctionRefs :: (a -> EnvMonad b) -> [Some Ref]
Environment Monad
updateRefs :: MonadPlus m => [EnvMonad a] -> Environment -> m Environment Source
Running the monad
runEnvMonad :: EnvMonad a -> Environment -> [(a, Environment)] Source
execEnvMonad :: EnvMonad a -> Environment -> [Environment] Source
evalEnvMonad :: EnvMonad a -> Environment -> [a] Source
Extracting used references
envMonadRefs :: EnvMonad a -> [Some Ref] Source
envMonadFunctionRefs :: (a -> EnvMonad b) -> [Some Ref] Source