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

Safe Haskell | Safe-Inferred
Language | Haskell2010

Control.Monad.Trans.MultiState.Class

Contents

- MonadMultiState class

Description

The multi-valued version of mtl's MonadState

Synopsis

- class Monad m => MonadMultiGet a (m :: Type -> Type) where
  - mGet :: m a
- class MonadMultiGet a m => MonadMultiState a (m :: Type -> Type) where
  - mSet :: a -> m ()

# MonadMultiState class

class Monad m => MonadMultiGet a (m :: Type -> Type) where Source #

In contrast to MonadMultiReader, MonadMultiGet is defined for State too, so it corresponds to read-access of any kind.

Note however that for MultiRWS, only the values from the `state` part can be accessed via `MonadMultiGet`, due to limitations of the design of `MultiRWS` and of the type system. This is issue is resolved in the `MultiGST` type.

Methods

mGet Source #

Arguments

:: m a | Access to a specific type in the environment.

#### Instances

Instances details

(MonadTrans t, Monad (t m), MonadMultiGet a m) => MonadMultiGet a (t m) Source # |
Instance details Defined in Control.Monad.Trans.MultiGet.Class Methods mGet :: t m a Source #
(Monad m, HListMContains 'GettableFlag a cts) => MonadMultiGet a (MultiGSTT cts m) Source # |
Instance details Defined in Control.Monad.Trans.MultiGST.Lazy Methods mGet :: MultiGSTT cts m a Source #
(Monad m, HListMContains 'GettableFlag a cts) => MonadMultiGet a (MultiGSTT cts m) Source # |
Instance details Defined in Control.Monad.Trans.MultiGST.Strict Methods mGet :: MultiGSTT cts m a Source #
(Monad m, ContainsType a c) => MonadMultiGet a (MultiReaderT c m) Source # |
Instance details Defined in Control.Monad.Trans.MultiReader.Lazy Methods mGet :: MultiReaderT c m a Source #
(Monad m, ContainsType a c) => MonadMultiGet a (MultiReaderT c m) Source # |
Instance details Defined in Control.Monad.Trans.MultiReader.Strict Methods mGet :: MultiReaderT c m a Source #
(Monad m, ContainsType a c) => MonadMultiGet a (MultiStateT c m) Source # |
Instance details Defined in Control.Monad.Trans.MultiState.Lazy Methods mGet :: MultiStateT c m a Source #
(Monad m, ContainsType a c) => MonadMultiGet a (MultiStateT c m) Source # |
Instance details Defined in Control.Monad.Trans.MultiState.Strict Methods mGet :: MultiStateT c m a Source #
(Monad m, ContainsType a s) => MonadMultiGet a (MultiRWST r w s m) Source # |
Instance details Defined in Control.Monad.Trans.MultiRWS.Lazy Methods mGet :: MultiRWST r w s m a Source #
(Monad m, ContainsType a s) => MonadMultiGet a (MultiRWST r w s m) Source # |
Instance details Defined in Control.Monad.Trans.MultiRWS.Strict Methods mGet :: MultiRWST r w s m a Source #

class MonadMultiGet a m => MonadMultiState a (m :: Type -> Type) where Source #

Methods

mSet :: a -> m () Source #

#### Instances

Instances details

(MonadTrans t, Monad (t m), MonadMultiState a m) => MonadMultiState a (t m) Source # |
Instance details Defined in Control.Monad.Trans.MultiState.Class Methods mSet :: a -> t m () Source #
(Monad m, HListMContains 'SettableFlag a cts) => MonadMultiState a (MultiGSTT cts m) Source # |
Instance details Defined in Control.Monad.Trans.MultiGST.Lazy Methods mSet :: a -> MultiGSTT cts m () Source #
(Monad m, HListMContains 'SettableFlag a cts) => MonadMultiState a (MultiGSTT cts m) Source # |
Instance details Defined in Control.Monad.Trans.MultiGST.Strict Methods mSet :: a -> MultiGSTT cts m () Source #
(Monad m, ContainsType a c) => MonadMultiState a (MultiStateT c m) Source # |
Instance details Defined in Control.Monad.Trans.MultiState.Lazy Methods mSet :: a -> MultiStateT c m () Source #
(Monad m, ContainsType a c) => MonadMultiState a (MultiStateT c m) Source # |
Instance details Defined in Control.Monad.Trans.MultiState.Strict Methods mSet :: a -> MultiStateT c m () Source #
(Monad m, ContainsType a s) => MonadMultiState a (MultiRWST r w s m) Source # |
Instance details Defined in Control.Monad.Trans.MultiRWS.Lazy Methods mSet :: a -> MultiRWST r w s m () Source #
(Monad m, ContainsType a s) => MonadMultiState a (MultiRWST r w s m) Source # |
Instance details Defined in Control.Monad.Trans.MultiRWS.Strict Methods mSet :: a -> MultiRWST r w s m () Source #