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.MultiRWS.Strict

Contents

- MultiRWST
- MonadMulti classes
- run-functions (extracting from RWST)
- with-functions (extending an RWST)
- without-functions (reducing an RWST; inverse of with)
- inflate-functions (run simple transformer in MultiRWST)
- other functions

Description

The multi-valued version of mtl's RWS / RWST

Synopsis

- newtype MultiRWST r w s m a = MultiRWST {
  - runMultiRWSTRaw :: StateT (HList r, HList w, HList s) m a
  }
- type MultiRWSTNull = MultiRWST '[] '[] '[]
- type MultiRWS r w s = MultiRWST r w s Identity
- class Monad m => MonadMultiReader a m where
  - mAsk :: m a
- class (Monad m, Monoid a) => MonadMultiWriter a m where
  - mTell :: a -> m ()
- class Monad m => MonadMultiGet a m where
  - mGet :: m a
- class MonadMultiGet a m => MonadMultiState a m where
  - mSet :: a -> m ()
- runMultiRWST :: (Monad m, Monoid (HList w)) => HList r -> HList s -> MultiRWST r w s m a -> m (a, HList s, HList w)
- runMultiRWSTASW :: (Monad m, Monoid (HList w)) => HList r -> HList s -> MultiRWST r w s m a -> m (a, HList s, HList w)
- runMultiRWSTW :: (Monad m, Monoid (HList w)) => HList r -> HList s -> MultiRWST r w s m a -> m (HList w)
- runMultiRWSTAW :: (Monad m, Monoid (HList w)) => HList r -> HList s -> MultiRWST r w s m a -> m (a, HList w)
- runMultiRWSTSW :: (Monad m, Monoid (HList w)) => HList r -> HList s -> MultiRWST r w s m a -> m (HList s, HList w)
- runMultiRWSTNil :: Monad m => MultiRWST '[] '[] '[] m a -> m a
- runMultiRWSTNil_ :: (Monad m, Functor m) => MultiRWST '[] '[] '[] m a -> m ()
- withMultiReader :: Monad m => r -> MultiRWST (r ': rs) w s m a -> MultiRWST rs w s m a
- withMultiReader_ :: (Functor m, Monad m) => r -> MultiRWST (r ': rs) w s m a -> MultiRWST rs w s m ()
- withMultiReaders :: Monad m => HList r1 -> MultiRWST (Append r1 r2) w s m a -> MultiRWST r2 w s m a
- withMultiReaders_ :: (Functor m, Monad m) => HList r1 -> MultiRWST (Append r1 r2) w s m a -> MultiRWST r2 w s m ()
- withMultiWriter :: (Monoid w, Monad m) => MultiRWST r (w ': ws) s m a -> MultiRWST r ws s m (a, w)
- withMultiWriterAW :: (Monoid w, Monad m) => MultiRWST r (w ': ws) s m a -> MultiRWST r ws s m (a, w)
- withMultiWriterWA :: (Monoid w, Monad m) => MultiRWST r (w ': ws) s m a -> MultiRWST r ws s m (w, a)
- withMultiWriterW :: (Monoid w, Monad m) => MultiRWST r (w ': ws) s m a -> MultiRWST r ws s m w
- withMultiWriters :: forall r w1 w2 s m a. (Monoid (HList w1), Monad m, HInit w1) => MultiRWST r (Append w1 w2) s m a -> MultiRWST r w2 s m (a, HList w1)
- withMultiWritersAW :: forall r w1 w2 s m a. (Monoid (HList w1), Monad m, HInit w1) => MultiRWST r (Append w1 w2) s m a -> MultiRWST r w2 s m (a, HList w1)
- withMultiWritersWA :: forall r w1 w2 s m a. (Monoid (HList w1), Monad m, HInit w1) => MultiRWST r (Append w1 w2) s m a -> MultiRWST r w2 s m (HList w1, a)
- withMultiWritersW :: forall r w1 w2 s m a. (Monoid (HList w1), Monad m, HInit w1) => MultiRWST r (Append w1 w2) s m a -> MultiRWST r w2 s m (HList w1)
- withMultiState :: Monad m => s -> MultiRWST r w (s ': ss) m a -> MultiRWST r w ss m (a, s)
- withMultiStateAS :: Monad m => s -> MultiRWST r w (s ': ss) m a -> MultiRWST r w ss m (a, s)
- withMultiStateSA :: Monad m => s -> MultiRWST r w (s ': ss) m a -> MultiRWST r w ss m (s, a)
- withMultiStateA :: Monad m => s -> MultiRWST r w (s ': ss) m a -> MultiRWST r w ss m a
- withMultiStateS :: Monad m => s -> MultiRWST r w (s ': ss) m a -> MultiRWST r w ss m s
- withMultiState_ :: (Functor m, Monad m) => s -> MultiRWST r w (s ': ss) m a -> MultiRWST r w ss m ()
- withMultiStates :: Monad m => HList s1 -> MultiRWST r w (Append s1 s2) m a -> MultiRWST r w s2 m (a, HList s1)
- withMultiStatesAS :: Monad m => HList s1 -> MultiRWST r w (Append s1 s2) m a -> MultiRWST r w s2 m (a, HList s1)
- withMultiStatesSA :: Monad m => HList s1 -> MultiRWST r w (Append s1 s2) m a -> MultiRWST r w s2 m (HList s1, a)
- withMultiStatesA :: Monad m => HList s1 -> MultiRWST r w (Append s1 s2) m a -> MultiRWST r w s2 m a
- withMultiStatesS :: Monad m => HList s1 -> MultiRWST r w (Append s1 s2) m a -> MultiRWST r w s2 m (HList s1)
- withMultiStates_ :: (Functor m, Monad m) => HList s1 -> MultiRWST r w (Append s1 s2) m a -> MultiRWST r w s2 m ()
- withoutMultiReader :: Monad m => MultiRWST rs w s m a -> MultiRWST (r ': rs) w s m a
- withoutMultiState :: Monad m => MultiRWST r w ss m a -> MultiRWST r w (s ': ss) m a
- inflateReader :: (Monad m, ContainsType r rs) => ReaderT r m a -> MultiRWST rs w s m a
- inflateMultiReader :: Monad m => MultiReaderT r m a -> MultiRWST r w s m a
- inflateWriter :: (Monad m, ContainsType w ws, Monoid w) => WriterT w m a -> MultiRWST r ws s m a
- inflateMultiWriter :: (Functor m, Monad m, Monoid (HList w)) => MultiWriterT w m a -> MultiRWST r w s m a
- inflateState :: (Monad m, MonadTrans t, MonadMultiState s (t m)) => StateT s m a -> t m a
- inflateMultiState :: (Functor m, Monad m) => MultiStateT s m a -> MultiRWST r w s m a
- mapMultiRWST :: ss ~ (HList r, HList w, HList s) => (m (a, ss) -> m' (a', ss)) -> MultiRWST r w s m a -> MultiRWST r w s m' a'
- mGetRawR :: Monad m => MultiRWST r w s m (HList r)
- mGetRawW :: Monad m => MultiRWST r w s m (HList w)
- mGetRawS :: Monad m => MultiRWST r w s m (HList s)
- mPutRawR :: Monad m => HList r -> MultiRWST r w s m ()
- mPutRawW :: Monad m => HList w -> MultiRWST r w s m ()
- mPutRawS :: Monad m => HList s -> MultiRWST r w s m ()

# MultiRWST

newtype MultiRWST r w s m a Source #

Constructors

MultiRWST |

Fields

- runMultiRWSTRaw :: StateT (HList r, HList w, HList s) m a

#### Instances

Instances details

MonadBaseControl b m => MonadBaseControl b (MultiRWST r w s m) Source # |
Instance details Defined in Control.Monad.Trans.MultiRWS.Strict Associated Types type StM (MultiRWST r w s m) a Source # Methods liftBaseWith :: (RunInBase (MultiRWST r w s m) b -> b a) -> MultiRWST r w s m a Source # restoreM :: StM (MultiRWST r w s m) a -> 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 #
(Monad m, ContainsType a r) => MonadMultiReader a (MultiRWST r w s m) Source # |
Instance details Defined in Control.Monad.Trans.MultiRWS.Strict Methods mAsk :: MultiRWST r w s m a 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 #
(Monad m, ContainsType a w, Monoid a) => MonadMultiWriter a (MultiRWST r w s m) Source # |
Instance details Defined in Control.Monad.Trans.MultiRWS.Strict Methods mTell :: a -> MultiRWST r w s m () Source #
MonadBase b m => MonadBase b (MultiRWST r w s m) Source # |
Instance details Defined in Control.Monad.Trans.MultiRWS.Strict Methods liftBase :: b α -> MultiRWST r w s m α Source #
MonadTransControl (MultiRWST r w s) Source # |
Instance details Defined in Control.Monad.Trans.MultiRWS.Strict Associated Types type StT (MultiRWST r w s) a Source # Methods liftWith :: Monad m => (Run (MultiRWST r w s) -> m a) -> MultiRWST r w s m a Source # restoreT :: Monad m => m (StT (MultiRWST r w s) a) -> MultiRWST r w s m a Source #
MonadTrans (MultiRWST r w s) Source # |
Instance details Defined in Control.Monad.Trans.MultiRWS.Strict Methods lift :: Monad m => m a -> MultiRWST r w s m a Source #
MonadFix m => MonadFix (MultiRWST r w s m) Source # |
Instance details Defined in Control.Monad.Trans.MultiRWS.Strict Methods mfix :: (a -> MultiRWST r w s m a) -> MultiRWST r w s m a Source #
MonadIO m => MonadIO (MultiRWST r w s m) Source # |
Instance details Defined in Control.Monad.Trans.MultiRWS.Strict Methods liftIO :: IO a -> MultiRWST r w s m a Source #
(Functor m, Applicative m, MonadPlus m) => Alternative (MultiRWST r w s m) Source # |
Instance details Defined in Control.Monad.Trans.MultiRWS.Strict Methods empty :: MultiRWST r w s m a Source # (<|>) :: MultiRWST r w s m a -> MultiRWST r w s m a -> MultiRWST r w s m a Source # some :: MultiRWST r w s m a -> MultiRWST r w s m [a] Source # many :: MultiRWST r w s m a -> MultiRWST r w s m [a] Source #
(Applicative m, Monad m) => Applicative (MultiRWST r w s m) Source # |

Instance details

Defined in Control.Monad.Trans.MultiRWS.Strict

Methods

pure :: a -> MultiRWST r w s m a Source #

(<*>) :: MultiRWST r w s m (a -> b) -> MultiRWST r w s m a -> MultiRWST r w s m b Source #

liftA2 :: (a -> b -> c) -> MultiRWST r w s m a -> MultiRWST r w s m b -> MultiRWST r w s m c Source #

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

(<*) :: MultiRWST r w s m a -> MultiRWST r w s m b -> MultiRWST r w s m a Source #

Functor f => Functor (MultiRWST r w s f) Source # |
Instance details Defined in Control.Monad.Trans.MultiRWS.Strict Methods fmap :: (a -> b) -> MultiRWST r w s f a -> MultiRWST r w s f b Source # (<$) :: a -> MultiRWST r w s f b -> MultiRWST r w s f a Source #
Monad m => Monad (MultiRWST r w s m) Source # |
Instance details Defined in Control.Monad.Trans.MultiRWS.Strict Methods (>>=) :: MultiRWST r w s m a -> (a -> MultiRWST r w s m b) -> MultiRWST r w s m b Source # (>>) :: MultiRWST r w s m a -> MultiRWST r w s m b -> MultiRWST r w s m b Source # return :: a -> MultiRWST r w s m a Source #
MonadPlus m => MonadPlus (MultiRWST r w s m) Source # |
Instance details Defined in Control.Monad.Trans.MultiRWS.Strict Methods mzero :: MultiRWST r w s m a Source # mplus :: MultiRWST r w s m a -> MultiRWST r w s m a -> MultiRWST r w s m a Source #
type StT (MultiRWST r w s) a Source # |
Instance details Defined in Control.Monad.Trans.MultiRWS.Strict type StT (MultiRWST r w s) a = (a, (HList r, HList w, HList s))
type StM (MultiRWST r w s m) a Source # |
Instance details Defined in Control.Monad.Trans.MultiRWS.Strict type StM (MultiRWST r w s m) a = ComposeSt (MultiRWST r w s) m a

type MultiRWSTNull = MultiRWST '[] '[] '[] Source #

type MultiRWS r w s = MultiRWST r w s Identity Source #

# MonadMulti classes

class Monad m => MonadMultiReader a m where Source #

All methods must be defined.

The idea is: Any monad stack is instance of `MonadMultiReader a`, iff the stack contains a `MultiReaderT x` with a element of x.

Methods

mAsk Source #

Arguments

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

#### Instances

Instances details

(MonadTrans t, Monad (t m), MonadMultiReader a m) => MonadMultiReader a (t m) Source # |
Instance details Defined in Control.Monad.Trans.MultiReader.Class Methods mAsk :: t m a Source #
(Monad m, ContainsType a c) => MonadMultiReader a (MultiReaderT c m) Source # |
Instance details Defined in Control.Monad.Trans.MultiReader.Lazy Methods mAsk :: MultiReaderT c m a Source #
(Monad m, ContainsType a c) => MonadMultiReader a (MultiReaderT c m) Source # |
Instance details Defined in Control.Monad.Trans.MultiReader.Strict Methods mAsk :: MultiReaderT c m a Source #
(Monad m, ContainsType a r) => MonadMultiReader a (MultiRWST r w s m) Source # |
Instance details Defined in Control.Monad.Trans.MultiRWS.Lazy Methods mAsk :: MultiRWST r w s m a Source #
(Monad m, ContainsType a r) => MonadMultiReader a (MultiRWST r w s m) Source # |
Instance details Defined in Control.Monad.Trans.MultiRWS.Strict Methods mAsk :: MultiRWST r w s m a Source #

class (Monad m, Monoid a) => MonadMultiWriter a m where Source #

Methods

mTell :: a -> m () Source #

#### Instances

Instances details

(MonadTrans t, Monad (t m), MonadMultiWriter a m) => MonadMultiWriter a (t m) Source # |
Instance details Defined in Control.Monad.Trans.MultiWriter.Class Methods mTell :: a -> t m () Source #
(Monad m, Monoid a, HListMContains 'TellableFlag a cts) => MonadMultiWriter a (MultiGSTT cts m) Source # |
Instance details Defined in Control.Monad.Trans.MultiGST.Lazy Methods mTell :: a -> MultiGSTT cts m () Source #
(Monad m, Monoid a, HListMContains 'TellableFlag a cts) => MonadMultiWriter a (MultiGSTT cts m) Source # |
Instance details Defined in Control.Monad.Trans.MultiGST.Strict Methods mTell :: a -> MultiGSTT cts m () Source #
(Monad m, ContainsType a c, Monoid a) => MonadMultiWriter a (MultiWriterT c m) Source # |
Instance details Defined in Control.Monad.Trans.MultiWriter.Lazy Methods mTell :: a -> MultiWriterT c m () Source #
(Monad m, ContainsType a c, Monoid a) => MonadMultiWriter a (MultiWriterT c m) Source # |
Instance details Defined in Control.Monad.Trans.MultiWriter.Strict Methods mTell :: a -> MultiWriterT c m () Source #
(Monad m, ContainsType a w, Monoid a) => MonadMultiWriter a (MultiRWST r w s m) Source # |
Instance details Defined in Control.Monad.Trans.MultiRWS.Lazy Methods mTell :: a -> MultiRWST r w s m () Source #
(Monad m, ContainsType a w, Monoid a) => MonadMultiWriter a (MultiRWST r w s m) Source # |
Instance details Defined in Control.Monad.Trans.MultiRWS.Strict Methods mTell :: a -> MultiRWST r w s m () Source #

class Monad m => MonadMultiGet a m 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 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 #

# run-functions (extracting from RWST)

runMultiRWST :: (Monad m, Monoid (HList w)) => HList r -> HList s -> MultiRWST r w s m a -> m (a, HList s, HList w) Source #

runMultiRWSTASW :: (Monad m, Monoid (HList w)) => HList r -> HList s -> MultiRWST r w s m a -> m (a, HList s, HList w) Source #

runMultiRWSTW :: (Monad m, Monoid (HList w)) => HList r -> HList s -> MultiRWST r w s m a -> m (HList w) Source #

runMultiRWSTAW :: (Monad m, Monoid (HList w)) => HList r -> HList s -> MultiRWST r w s m a -> m (a, HList w) Source #

runMultiRWSTSW :: (Monad m, Monoid (HList w)) => HList r -> HList s -> MultiRWST r w s m a -> m (HList s, HList w) Source #

runMultiRWSTNil :: Monad m => MultiRWST '[] '[] '[] m a -> m a Source #

runMultiRWSTNil_ :: (Monad m, Functor m) => MultiRWST '[] '[] '[] m a -> m () Source #

# with-functions (extending an RWST)

withMultiReader :: Monad m => r -> MultiRWST (r ': rs) w s m a -> MultiRWST rs w s m a Source #

withMultiReader_ :: (Functor m, Monad m) => r -> MultiRWST (r ': rs) w s m a -> MultiRWST rs w s m () Source #

withMultiReaders :: Monad m => HList r1 -> MultiRWST (Append r1 r2) w s m a -> MultiRWST r2 w s m a Source #

withMultiReaders_ :: (Functor m, Monad m) => HList r1 -> MultiRWST (Append r1 r2) w s m a -> MultiRWST r2 w s m () Source #

withMultiWriter :: (Monoid w, Monad m) => MultiRWST r (w ': ws) s m a -> MultiRWST r ws s m (a, w) Source #

withMultiWriterAW :: (Monoid w, Monad m) => MultiRWST r (w ': ws) s m a -> MultiRWST r ws s m (a, w) Source #

withMultiWriterWA :: (Monoid w, Monad m) => MultiRWST r (w ': ws) s m a -> MultiRWST r ws s m (w, a) Source #

withMultiWriterW :: (Monoid w, Monad m) => MultiRWST r (w ': ws) s m a -> MultiRWST r ws s m w Source #

withMultiWriters :: forall r w1 w2 s m a. (Monoid (HList w1), Monad m, HInit w1) => MultiRWST r (Append w1 w2) s m a -> MultiRWST r w2 s m (a, HList w1) Source #

withMultiWritersAW :: forall r w1 w2 s m a. (Monoid (HList w1), Monad m, HInit w1) => MultiRWST r (Append w1 w2) s m a -> MultiRWST r w2 s m (a, HList w1) Source #

withMultiWritersWA :: forall r w1 w2 s m a. (Monoid (HList w1), Monad m, HInit w1) => MultiRWST r (Append w1 w2) s m a -> MultiRWST r w2 s m (HList w1, a) Source #

withMultiWritersW :: forall r w1 w2 s m a. (Monoid (HList w1), Monad m, HInit w1) => MultiRWST r (Append w1 w2) s m a -> MultiRWST r w2 s m (HList w1) Source #

withMultiState :: Monad m => s -> MultiRWST r w (s ': ss) m a -> MultiRWST r w ss m (a, s) Source #

withMultiStateAS :: Monad m => s -> MultiRWST r w (s ': ss) m a -> MultiRWST r w ss m (a, s) Source #

withMultiStateSA :: Monad m => s -> MultiRWST r w (s ': ss) m a -> MultiRWST r w ss m (s, a) Source #

withMultiStateA :: Monad m => s -> MultiRWST r w (s ': ss) m a -> MultiRWST r w ss m a Source #

withMultiStateS :: Monad m => s -> MultiRWST r w (s ': ss) m a -> MultiRWST r w ss m s Source #

withMultiState_ :: (Functor m, Monad m) => s -> MultiRWST r w (s ': ss) m a -> MultiRWST r w ss m () Source #

withMultiStates :: Monad m => HList s1 -> MultiRWST r w (Append s1 s2) m a -> MultiRWST r w s2 m (a, HList s1) Source #

withMultiStatesAS :: Monad m => HList s1 -> MultiRWST r w (Append s1 s2) m a -> MultiRWST r w s2 m (a, HList s1) Source #

withMultiStatesSA :: Monad m => HList s1 -> MultiRWST r w (Append s1 s2) m a -> MultiRWST r w s2 m (HList s1, a) Source #

withMultiStatesA :: Monad m => HList s1 -> MultiRWST r w (Append s1 s2) m a -> MultiRWST r w s2 m a Source #

withMultiStatesS :: Monad m => HList s1 -> MultiRWST r w (Append s1 s2) m a -> MultiRWST r w s2 m (HList s1) Source #

withMultiStates_ :: (Functor m, Monad m) => HList s1 -> MultiRWST r w (Append s1 s2) m a -> MultiRWST r w s2 m () Source #

# without-functions (reducing an RWST; inverse of with)

withoutMultiReader :: Monad m => MultiRWST rs w s m a -> MultiRWST (r ': rs) w s m a Source #

withoutMultiState :: Monad m => MultiRWST r w ss m a -> MultiRWST r w (s ': ss) m a Source #

# inflate-functions (run simple transformer in MultiRWST)

inflateReader :: (Monad m, ContainsType r rs) => ReaderT r m a -> MultiRWST rs w s m a Source #

inflateMultiReader :: Monad m => MultiReaderT r m a -> MultiRWST r w s m a Source #

inflateWriter :: (Monad m, ContainsType w ws, Monoid w) => WriterT w m a -> MultiRWST r ws s m a Source #

inflateMultiWriter :: (Functor m, Monad m, Monoid (HList w)) => MultiWriterT w m a -> MultiRWST r w s m a Source #

inflateState :: (Monad m, MonadTrans t, MonadMultiState s (t m)) => StateT s m a -> t m a Source #

inflateMultiState :: (Functor m, Monad m) => MultiStateT s m a -> MultiRWST r w s m a Source #

# other functions

mapMultiRWST :: ss ~ (HList r, HList w, HList s) => (m (a, ss) -> m' (a', ss)) -> MultiRWST r w s m a -> MultiRWST r w s m' a' Source #

mGetRawR :: Monad m => MultiRWST r w s m (HList r) Source #

mGetRawW :: Monad m => MultiRWST r w s m (HList w) Source #

mGetRawS :: Monad m => MultiRWST r w s m (HList s) Source #

mPutRawR :: Monad m => HList r -> MultiRWST r w s m () Source #

mPutRawW :: Monad m => HList w -> MultiRWST r w s m () Source #

mPutRawS :: Monad m => HList s -> MultiRWST r w s m () Source #