monad-gen-0.2.0.1: A simple monad for generating fresh integers

Safe HaskellSafe-Inferred
LanguageHaskell2010

Control.Monad.Gen.Class

Synopsis

Documentation

class Monad m => MonadGen e m | m -> e where Source

The MTL style class for generating fresh values

Methods

gen :: m e Source

Generate a fresh value e, gen should never produce the same value within a monadic computation.

Instances

MonadGen e m => MonadGen e (MaybeT m) 
MonadGen e m => MonadGen e (ListT m) 
MonadGen e m => MonadGen e (IdentityT m) 
(MonadGen e m, Error err) => MonadGen e (ErrorT err m) 
(Monoid w, MonadGen e m) => MonadGen e (WriterT w m) 
MonadGen e m => MonadGen e (StateT s m) 
MonadGen e m => MonadGen e (ContT r m) 
(MonadGen e m, Monoid s) => MonadGen e (WriterT s m) 
MonadGen e m => MonadGen e (ReaderT s m) 
MonadGen e m => MonadGen e (StateT s m) 
(Monoid w, MonadGen e m) => MonadGen e (RWST r w s m)