Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data MidaEnv m a
- class Monad m => HasEnv m where
- getDefs :: m Defs
- setDefs :: Defs -> m ()
- setRandGen :: Natural -> m ()
- newRandGen :: m TFGen
- runMidaEnv :: Monad m => MidaEnv m a -> m a
- addDef :: HasEnv m => String -> SyntaxTree -> m ()
- remDef :: HasEnv m => String -> m ()
- clearDefs :: HasEnv m => m ()
- getPrin :: HasEnv m => String -> m SyntaxTree
- getSrc :: HasEnv m => String -> m Text
- fullSrc :: HasEnv m => m Text
- getRefs :: HasEnv m => m [String]
- purgeEnv :: HasEnv m => [String] -> m ()
- checkRecur :: HasEnv m => String -> SyntaxTree -> m Bool
Documentation
Monad that implements MIDA environment.
Monad m => Monad (MidaEnv m) Source | |
Functor m => Functor (MidaEnv m) Source | |
Monad m => Applicative (MidaEnv m) Source | |
MonadThrow m => MonadThrow (MidaEnv m) Source | |
MonadCatch m => MonadCatch (MidaEnv m) Source | |
MonadMask m => MonadMask (MidaEnv m) Source | |
MonadIO m => MonadIO (MidaEnv m) Source | |
MonadException m => MonadException (MidaEnv m) Source | |
Monad m => HasEnv (MidaEnv m) Source |
class Monad m => HasEnv m where Source
Type class for things that can be considered MIDA environment.
Get collection of all definitions.
setDefs :: Defs -> m () Source
Update definitions with given ones.
setRandGen :: Natural -> m () Source
Set random generator seed.
newRandGen :: m TFGen Source
Split current random generator, update it, and return new one.
runMidaEnv :: Monad m => MidaEnv m a -> m a Source
Run state monad with MIDA environment.
:: HasEnv m | |
=> String | Reference name |
-> SyntaxTree | AST of its principle |
-> m () |
Add a new definition to the environment.
:: HasEnv m | |
=> String | Reference name |
-> m SyntaxTree | Syntax tree |
Get principle corresponding to given variable name.
Get source code of definition given its name.
Purge environment removing definitions that are not used in construction of “top-level” definitions.
:: HasEnv m | |
=> String | Reference name |
-> SyntaxTree | Its syntax tree |
-> m Bool |
Check if definition with given name is depends on itself.