monad-gen-0.3.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 e') => MonadGen e (ErrorT e' 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) 
Monad m => MonadGen e (GenT e m) 
(Monoid w, MonadGen e m) => MonadGen e (RWST r w s m)