Safe Haskell | Safe-Inferred |
---|
- class Monad m => MonadSupply s m | m -> s where
Documentation
class Monad m => MonadSupply s m | m -> s whereSource
A class implemented by monads that can supply values of type s
. Minimal implementation: supplyNew
or supplyN
.
Supply a new value of type s
.
Supply n
values of type s
.
(Monad (VSupplyT m), Monad m) => MonadSupply Var (VSupplyT m) | |
(Monad (StateT s m), MonadSupply x m) => MonadSupply x (StateT s m) | |
(Monad (ContT r m), MonadSupply x m) => MonadSupply x (ContT r m) | |
(Monad (WriterT w m), MonadSupply x m, Monoid w) => MonadSupply x (WriterT w m) | |
(Monad (WriterT w m), MonadSupply x m, Monoid w) => MonadSupply x (WriterT w m) | |
(Monad (ErrorT e m), Error e, MonadSupply x m) => MonadSupply x (ErrorT e m) | |
(Monad (ReaderT r m), MonadSupply x m) => MonadSupply x (ReaderT r m) | |
(Monad (StateT s m), MonadSupply x m) => MonadSupply x (StateT s m) |