Copyright | (c) 2014, Aleksey Kliger |
---|---|
License | BSD3 (See LICENSE) |
Maintainer | Aleksey Kliger |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Global freshness monad.
Documentation
class Monad m => Fresh m where Source #
The Fresh
type class governs monads which can generate new
globally unique Name
s based on a given Name
.
Fresh m => Fresh (MaybeT m) Source # | |
Monad m => Fresh (FreshMT m) Source # | |
Fresh m => Fresh (FFM m) Source # | |
(Monoid w, Fresh m) => Fresh (WriterT w m) Source # | |
(Monoid w, Fresh m) => Fresh (WriterT w m) Source # | |
Fresh m => Fresh (StateT s m) Source # | |
Fresh m => Fresh (StateT s m) Source # | |
(Error e, Fresh m) => Fresh (ErrorT e m) Source # | |
Fresh m => Fresh (ExceptT e m) Source # | |
Fresh m => Fresh (ReaderT * r m) Source # | |
The FreshM
monad transformer. Keeps track of the lowest index
still globally unused, and increments the index every time it is
asked for a fresh name.
MonadTrans FreshMT Source # | |
MonadReader r m => MonadReader r (FreshMT m) Source # | |
MonadError e m => MonadError e (FreshMT m) Source # | |
MonadState s m => MonadState s (FreshMT m) Source # | |
MonadWriter w m => MonadWriter w (FreshMT m) Source # | |
Monad m => Monad (FreshMT m) Source # | |
Functor m => Functor (FreshMT m) Source # | |
MonadFix m => MonadFix (FreshMT m) Source # | |
Monad m => Applicative (FreshMT m) Source # | |
MonadIO m => MonadIO (FreshMT m) Source # | |
MonadPlus m => Alternative (FreshMT m) Source # | |
MonadPlus m => MonadPlus (FreshMT m) Source # | |
MonadCont m => MonadCont (FreshMT m) Source # | |
Monad m => Fresh (FreshMT m) Source # | |
runFreshMT :: Monad m => FreshMT m a -> m a Source #
Run a FreshMT
computation (with the global index starting at zero).
contFreshMT :: Monad m => FreshMT m a -> Integer -> m a Source #
Run a FreshMT
computation given a starting index for fresh name
generation.
runFreshM :: FreshM a -> a Source #
Run a FreshM computation (with the global index starting at zero).
contFreshM :: FreshM a -> Integer -> a Source #
Run a FreshM computation given a starting index.