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 Source #

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 () Source #

state set function for values of type a.

mGet :: m a Source #

state get function for values of type a.

Instances

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

Methods

mSet :: a -> t m () Source #

mGet :: t m a Source #

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

Methods

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

mGet :: MultiStateT c m a Source #

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

Methods

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

mGet :: MultiStateT c m a Source #

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

Methods

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

mGet :: MultiRWST r w s m a Source #

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

Methods

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

mGet :: MultiRWST r w s m a Source #