multistate-0.7.1.2: like mtl's ReaderT / WriterT / StateT, but more than one contained value/type.

Safe HaskellSafe
LanguageHaskell2010

Control.Monad.Trans.MultiState.Class

Contents

Description

The multi-valued version of mtl's MonadState

Synopsis

MonadMultiState class

class Monad m => MonadMultiState a m where #

All methods must be defined.

The idea is: Any monad stack is instance of MonadMultiState a, iff the stack contains a MultiStateT x with a element of x.

Minimal complete definition

mSet, mGet

Methods

mSet :: a -> m () #

state set function for values of type a.

mGet :: m a #

state get function for values of type a.

Instances

(MonadTrans t, Monad (t m), MonadMultiState a m) => MonadMultiState a (t m) # 

Methods

mSet :: a -> t m () #

mGet :: t m a #

(Monad m, ContainsType a c) => MonadMultiState a (MultiStateT c m) # 

Methods

mSet :: a -> MultiStateT c m () #

mGet :: MultiStateT c m a #

(Monad m, ContainsType a c) => MonadMultiState a (MultiStateT c m) # 

Methods

mSet :: a -> MultiStateT c m () #

mGet :: MultiStateT c m a #

(Monad m, ContainsType a s) => MonadMultiState a (MultiRWST r w s m) # 

Methods

mSet :: a -> MultiRWST r w s m () #

mGet :: MultiRWST r w s m a #

(Monad m, ContainsType a s) => MonadMultiState a (MultiRWST r w s m) # 

Methods

mSet :: a -> MultiRWST r w s m () #

mGet :: MultiRWST r w s m a #