    {-# LANGUAGE CPP #-}
    {-# LANGUAGE FlexibleContexts #-}
    {-# LANGUAGE RankNTypes #-}
    {-# LANGUAGE ScopedTypeVariables #-}

    -- | The multi-valued version of mtl's RWS / RWST
    module Control.Monad.Trans.MultiRWS.Lazy
      (
      -- * MultiRWST
        MultiRWST(..)
      , MultiRWSTNull
      , MultiRWS
      -- * MonadMulti classes
      , MonadMultiReader(..)
      , MonadMultiWriter(..)
      , MonadMultiGet(..)
      , MonadMultiState(..)
      -- * run-functions (extracting from RWST)
      , runMultiRWST
      , runMultiRWSTASW
      , runMultiRWSTW
      , runMultiRWSTAW
      , runMultiRWSTSW
      , runMultiRWSTNil
      , runMultiRWSTNil_
      -- * with-functions (extending an RWST)
      , withMultiReader
      , withMultiReader_
      , withMultiReaders
      , withMultiReaders_
      , withMultiWriter
      , withMultiWriterAW
      , withMultiWriterWA
      , withMultiWriterW
      , withMultiWriters
      , withMultiWritersAW
      , withMultiWritersWA
      , withMultiWritersW
      , withMultiState
      , withMultiStateAS
      , withMultiStateSA
      , withMultiStateA
      , withMultiStateS
      , withMultiState_
      , withMultiStates
      , withMultiStatesAS
      , withMultiStatesSA
      , withMultiStatesA
      , withMultiStatesS
      , withMultiStates_
      -- * without-functions (reducing an RWST; inverse of with)
      , withoutMultiReader
      , withoutMultiState
      -- * inflate-functions (run simple transformer in MultiRWST)
      , inflateReader
      , inflateMultiReader
      , inflateWriter
      , inflateMultiWriter
      , inflateState
      , inflateMultiState
      -- * other functions
      , mapMultiRWST
      , mGetRawR
      , mGetRawW
      , mGetRawS
      , mPutRawR
      , mPutRawW
      , mPutRawS
      )
    where

    import Data.HList.HList
    import Data.HList.ContainsType

    import Control.Monad.Trans.MultiReader.Class ( MonadMultiReader(..) )
    import Control.Monad.Trans.MultiWriter.Class ( MonadMultiWriter(..) )
    import Control.Monad.Trans.MultiState.Class
    import Control.Monad.Trans.MultiReader.Lazy  ( MultiReaderT(..)
                                                 , runMultiReaderT )
    import Control.Monad.Trans.MultiWriter.Lazy  ( MultiWriterT(..)
                                                 , runMultiWriterT )
    import Control.Monad.Trans.MultiState.Lazy   ( MultiStateT(..)
                                                 , runMultiStateT )

    import Control.Monad.State.Lazy        ( StateT(..)
                                           , MonadState(..)
                                           , execStateT
                                           , evalStateT
                                           , mapStateT )
    import Control.Monad.Reader            ( ReaderT(..) )
    import Control.Monad.Writer.Lazy       ( WriterT(..) )
    import Control.Monad.Trans.Class       ( MonadTrans
                                           , lift )

    import Data.Functor.Identity           ( Identity )

    import Control.Applicative             ( Applicative(..)
                                           , Alternative(..)
                                           )
    import Control.Monad                   ( MonadPlus(..)
                                           , liftM
                                           , ap
                                           , void )
    import Control.Monad.Base              ( MonadBase(..)
                                           , liftBaseDefault
                                           )
    import Control.Monad.Trans.Control     ( MonadTransControl(..)
                                           , MonadBaseControl(..)
                                           , ComposeSt
                                           , defaultLiftBaseWith
                                           , defaultRestoreM
                                           )
    import Control.Monad.Fix               ( MonadFix(..) )
    import Control.Monad.IO.Class          ( MonadIO(..) )

    import Data.Monoid

    newtype MultiRWST r w s m a = MultiRWST {
      forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    runMultiRWSTRaw :: StateT (HList r, HList w, HList s) m a
    }

    type MultiRWSTNull = MultiRWST '[] '[] '[]

    type MultiRWS r w s = MultiRWST r w s Identity

    instance (Functor f) => Functor (MultiRWST r w s f) where
      fmap :: forall a b. (a -> b) -> MultiRWST r w s f a -> MultiRWST r w s f b
    fmap a -> b
    f = StateT (HList r, HList w, HList s) f b -> MultiRWST r w s f b
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList w, HList s) f b -> MultiRWST r w s f b)
    -> (MultiRWST r w s f a -> StateT (HList r, HList w, HList s) f b)
    -> MultiRWST r w s f a
    -> MultiRWST r w s f b
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (a -> b)
    -> StateT (HList r, HList w, HList s) f a
    -> StateT (HList r, HList w, HList s) f b
    forall a b.
    (a -> b)
    -> StateT (HList r, HList w, HList s) f a
    -> StateT (HList r, HList w, HList s) f b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap a -> b
    f (StateT (HList r, HList w, HList s) f a
     -> StateT (HList r, HList w, HList s) f b)
    -> (MultiRWST r w s f a -> StateT (HList r, HList w, HList s) f a)
    -> MultiRWST r w s f a
    -> StateT (HList r, HList w, HList s) f b
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . MultiRWST r w s f a -> StateT (HList r, HList w, HList s) f a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    runMultiRWSTRaw

    instance (Applicative m, Monad m) => Applicative (MultiRWST r w s m) where
      pure :: forall a. a -> MultiRWST r w s m a
    pure = StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a)
    -> (a -> StateT (HList r, HList w, HList s) m a)
    -> a
    -> MultiRWST r w s m a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . a -> StateT (HList r, HList w, HList s) m a
    forall a. a -> StateT (HList r, HList w, HList s) m a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure
      <*> :: forall a b.
    MultiRWST r w s m (a -> b)
    -> MultiRWST r w s m a -> MultiRWST r w s m b
    (<*>) = MultiRWST r w s m (a -> b)
    -> MultiRWST r w s m a -> MultiRWST r w s m b
    forall (m :: * -> *) a b. Monad m => m (a -> b) -> m a -> m b
    ap

    instance (Monad m) => Monad (MultiRWST r w s m) where
      return :: forall a. a -> MultiRWST r w s m a
    return = a -> MultiRWST r w s m a
    forall a. a -> MultiRWST r w s m a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure
      MultiRWST r w s m a
    k >>= :: forall a b.
    MultiRWST r w s m a
    -> (a -> MultiRWST r w s m b) -> MultiRWST r w s m b
    >>= a -> MultiRWST r w s m b
    f = StateT (HList r, HList w, HList s) m b -> MultiRWST r w s m b
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList w, HList s) m b -> MultiRWST r w s m b)
    -> StateT (HList r, HList w, HList s) m b -> MultiRWST r w s m b
    forall a b. (a -> b) -> a -> b
    $ MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    runMultiRWSTRaw MultiRWST r w s m a
    k StateT (HList r, HList w, HList s) m a
    -> (a -> StateT (HList r, HList w, HList s) m b)
    -> StateT (HList r, HList w, HList s) m b
    forall a b.
    StateT (HList r, HList w, HList s) m a
    -> (a -> StateT (HList r, HList w, HList s) m b)
    -> StateT (HList r, HList w, HList s) m b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= MultiRWST r w s m b -> StateT (HList r, HList w, HList s) m b
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    runMultiRWSTRaw (MultiRWST r w s m b -> StateT (HList r, HList w, HList s) m b)
    -> (a -> MultiRWST r w s m b)
    -> a
    -> StateT (HList r, HList w, HList s) m b
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . a -> MultiRWST r w s m b
    f

    instance MonadTrans (MultiRWST r w s) where
      lift :: forall (m :: * -> *) a. Monad m => m a -> MultiRWST r w s m a
    lift = StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a)
    -> (m a -> StateT (HList r, HList w, HList s) m a)
    -> m a
    -> MultiRWST r w s m a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . m a -> StateT (HList r, HList w, HList s) m a
    forall (m :: * -> *) a.
    Monad m =>
    m a -> StateT (HList r, HList w, HList s) m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift

    instance
    #if MIN_VERSION_base(4,8,0)
      {-# OVERLAPPING #-}
    #endif
        (Monad m, ContainsType a r)
          => MonadMultiReader a (MultiRWST r w s m) where
      mAsk :: MultiRWST r w s m a
    mAsk = StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a)
    -> StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    forall a b. (a -> b) -> a -> b
    $ ((HList r, HList w, HList s) -> a)
    -> StateT (HList r, HList w, HList s) m (HList r, HList w, HList s)
    -> StateT (HList r, HList w, HList s) m a
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM (\(HList r
    r,HList w
    _,HList s
    _) -> HList r -> a
    forall a (c :: [*]). ContainsType a c => HList c -> a
    getHListElem HList r
    r) StateT (HList r, HList w, HList s) m (HList r, HList w, HList s)
    forall s (m :: * -> *). MonadState s m => m s
    get

    instance
    #if MIN_VERSION_base(4,8,0)
      {-# OVERLAPPING #-}
    #endif
        (Monad m, ContainsType a w, Monoid a)
          => MonadMultiWriter a (MultiRWST r w s m) where
      mTell :: a -> MultiRWST r w s m ()
    mTell a
    v = StateT (HList r, HList w, HList s) m () -> MultiRWST r w s m ()
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList w, HList s) m () -> MultiRWST r w s m ())
    -> StateT (HList r, HList w, HList s) m () -> MultiRWST r w s m ()
    forall a b. (a -> b) -> a -> b
    $ do
        ~(HList r
    r,HList w
    w,HList s
    s) <- StateT (HList r, HList w, HList s) m (HList r, HList w, HList s)
    forall s (m :: * -> *). MonadState s m => m s
    get
        (HList r, HList w, HList s)
    -> StateT (HList r, HList w, HList s) m ()
    forall s (m :: * -> *). MonadState s m => s -> m ()
    put ((HList r, HList w, HList s)
     -> StateT (HList r, HList w, HList s) m ())
    -> (HList r, HList w, HList s)
    -> StateT (HList r, HList w, HList s) m ()
    forall a b. (a -> b) -> a -> b
    $ (HList r
    r, a -> HList w -> HList w
    forall a (c :: [*]). ContainsType a c => a -> HList c -> HList c
    setHListElem (HList w -> a
    forall a (c :: [*]). ContainsType a c => HList c -> a
    getHListElem HList w
    w a -> a -> a
    forall a. Monoid a => a -> a -> a
    `mappend` a
    v) HList w
    w, HList s
    s)

    instance
    #if MIN_VERSION_base(4,8,0)
      {-# OVERLAPPING #-}
    #endif
        (Monad m, ContainsType a s)
          => MonadMultiGet a (MultiRWST r w s m) where
      mGet :: MultiRWST r w s m a
    mGet = StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a)
    -> StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    forall a b. (a -> b) -> a -> b
    $ do
        ~(HList r
    _,HList w
    _,HList s
    s) <- StateT (HList r, HList w, HList s) m (HList r, HList w, HList s)
    forall s (m :: * -> *). MonadState s m => m s
    get
        a -> StateT (HList r, HList w, HList s) m a
    forall a. a -> StateT (HList r, HList w, HList s) m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (a -> StateT (HList r, HList w, HList s) m a)
    -> a -> StateT (HList r, HList w, HList s) m a
    forall a b. (a -> b) -> a -> b
    $ HList s -> a
    forall a (c :: [*]). ContainsType a c => HList c -> a
    getHListElem HList s
    s

    instance
    #if MIN_VERSION_base(4,8,0)
      {-# OVERLAPPING #-}
    #endif
        (Monad m, ContainsType a s)
          => MonadMultiState a (MultiRWST r w s m) where
      mSet :: a -> MultiRWST r w s m ()
    mSet a
    v = StateT (HList r, HList w, HList s) m () -> MultiRWST r w s m ()
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList w, HList s) m () -> MultiRWST r w s m ())
    -> StateT (HList r, HList w, HList s) m () -> MultiRWST r w s m ()
    forall a b. (a -> b) -> a -> b
    $ do
        ~(HList r
    r,HList w
    w,HList s
    s) <- StateT (HList r, HList w, HList s) m (HList r, HList w, HList s)
    forall s (m :: * -> *). MonadState s m => m s
    get
        (HList r, HList w, HList s)
    -> StateT (HList r, HList w, HList s) m ()
    forall s (m :: * -> *). MonadState s m => s -> m ()
    put (HList r
    r, HList w
    w, a -> HList s -> HList s
    forall a (c :: [*]). ContainsType a c => a -> HList c -> HList c
    setHListElem a
    v HList s
    s)

    instance MonadFix m => MonadFix (MultiRWST r w s m) where
      mfix :: forall a. (a -> MultiRWST r w s m a) -> MultiRWST r w s m a
    mfix a -> MultiRWST r w s m a
    f = StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a)
    -> StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    forall a b. (a -> b) -> a -> b
    $ (a -> StateT (HList r, HList w, HList s) m a)
    -> StateT (HList r, HList w, HList s) m a
    forall a.
    (a -> StateT (HList r, HList w, HList s) m a)
    -> StateT (HList r, HList w, HList s) m a
    forall (m :: * -> *) a. MonadFix m => (a -> m a) -> m a
    mfix (MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    runMultiRWSTRaw (MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a)
    -> (a -> MultiRWST r w s m a)
    -> a
    -> StateT (HList r, HList w, HList s) m a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . a -> MultiRWST r w s m a
    f)

    -- methods

    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 ()
    runMultiRWST :: forall (m :: * -> *) (w :: [*]) (r :: [*]) (s :: [*]) a.
    (Monad m, Monoid (HList w)) =>
    HList r
    -> HList s -> MultiRWST r w s m a -> m (a, HList s, HList w)
    runMultiRWST = HList r
    -> HList s -> MultiRWST r w s m a -> m (a, HList s, HList w)
    forall (m :: * -> *) (w :: [*]) (r :: [*]) (s :: [*]) a.
    (Monad m, Monoid (HList w)) =>
    HList r
    -> HList s -> MultiRWST r w s m a -> m (a, HList s, HList w)
    runMultiRWSTASW
    runMultiRWSTASW :: forall (m :: * -> *) (w :: [*]) (r :: [*]) (s :: [*]) a.
    (Monad m, Monoid (HList w)) =>
    HList r
    -> HList s -> MultiRWST r w s m a -> m (a, HList s, HList w)
    runMultiRWSTASW HList r
    r HList s
    s MultiRWST r w s m a
    k = do
      ~(a
    x, ~(HList r
    _, HList w
    w, HList s
    s')) <- StateT (HList r, HList w, HList s) m a
    -> (HList r, HList w, HList s)
    -> m (a, (HList r, HList w, HList s))
    forall s (m :: * -> *) a. StateT s m a -> s -> m (a, s)
    runStateT (MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    runMultiRWSTRaw MultiRWST r w s m a
    k) (HList r
    r, HList w
    forall a. Monoid a => a
    mempty, HList s
    s)
      (a, HList s, HList w) -> m (a, HList s, HList w)
    forall a. a -> m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ((a, HList s, HList w) -> m (a, HList s, HList w))
    -> (a, HList s, HList w) -> m (a, HList s, HList w)
    forall a b. (a -> b) -> a -> b
    $ (a
    x, HList s
    s', HList w
    w)
    runMultiRWSTW :: forall (m :: * -> *) (w :: [*]) (r :: [*]) (s :: [*]) a.
    (Monad m, Monoid (HList w)) =>
    HList r -> HList s -> MultiRWST r w s m a -> m (HList w)
    runMultiRWSTW HList r
    r HList s
    s MultiRWST r w s m a
    k = do
      ~(HList r
    _, HList w
    w, HList s
    _) <- StateT (HList r, HList w, HList s) m a
    -> (HList r, HList w, HList s) -> m (HList r, HList w, HList s)
    forall (m :: * -> *) s a. Monad m => StateT s m a -> s -> m s
    execStateT (MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    runMultiRWSTRaw MultiRWST r w s m a
    k) (HList r
    r, HList w
    forall a. Monoid a => a
    mempty, HList s
    s)
      HList w -> m (HList w)
    forall a. a -> m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (HList w -> m (HList w)) -> HList w -> m (HList w)
    forall a b. (a -> b) -> a -> b
    $ HList w
    w
    runMultiRWSTAW :: forall (m :: * -> *) (w :: [*]) (r :: [*]) (s :: [*]) a.
    (Monad m, Monoid (HList w)) =>
    HList r -> HList s -> MultiRWST r w s m a -> m (a, HList w)
    runMultiRWSTAW HList r
    r HList s
    s MultiRWST r w s m a
    k = do
      ~(a
    x, ~(HList r
    _, HList w
    w, HList s
    _)) <- StateT (HList r, HList w, HList s) m a
    -> (HList r, HList w, HList s)
    -> m (a, (HList r, HList w, HList s))
    forall s (m :: * -> *) a. StateT s m a -> s -> m (a, s)
    runStateT (MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    runMultiRWSTRaw MultiRWST r w s m a
    k) (HList r
    r, HList w
    forall a. Monoid a => a
    mempty, HList s
    s)
      (a, HList w) -> m (a, HList w)
    forall a. a -> m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ((a, HList w) -> m (a, HList w)) -> (a, HList w) -> m (a, HList w)
    forall a b. (a -> b) -> a -> b
    $ (a
    x, HList w
    w)
    runMultiRWSTSW :: forall (m :: * -> *) (w :: [*]) (r :: [*]) (s :: [*]) a.
    (Monad m, Monoid (HList w)) =>
    HList r -> HList s -> MultiRWST r w s m a -> m (HList s, HList w)
    runMultiRWSTSW HList r
    r HList s
    s MultiRWST r w s m a
    k = do
      ~(HList r
    _, HList w
    w, HList s
    s') <- StateT (HList r, HList w, HList s) m a
    -> (HList r, HList w, HList s) -> m (HList r, HList w, HList s)
    forall (m :: * -> *) s a. Monad m => StateT s m a -> s -> m s
    execStateT (MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    runMultiRWSTRaw MultiRWST r w s m a
    k) (HList r
    r, HList w
    forall a. Monoid a => a
    mempty, HList s
    s)
      (HList s, HList w) -> m (HList s, HList w)
    forall a. a -> m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ((HList s, HList w) -> m (HList s, HList w))
    -> (HList s, HList w) -> m (HList s, HList w)
    forall a b. (a -> b) -> a -> b
    $ (HList s
    s', HList w
    w)
    runMultiRWSTNil :: forall (m :: * -> *) a. Monad m => MultiRWST '[] '[] '[] m a -> m a
    runMultiRWSTNil  MultiRWST '[] '[] '[] m a
    k = StateT (HList '[], HList '[], HList '[]) m a
    -> (HList '[], HList '[], HList '[]) -> m a
    forall (m :: * -> *) s a. Monad m => StateT s m a -> s -> m a
    evalStateT (MultiRWST '[] '[] '[] m a
    -> StateT (HList '[], HList '[], HList '[]) m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    runMultiRWSTRaw MultiRWST '[] '[] '[] m a
    k) (HList '[]
    HNil, HList '[]
    HNil, HList '[]
    HNil)
    runMultiRWSTNil_ :: forall (m :: * -> *) a.
    (Monad m, Functor m) =>
    MultiRWST '[] '[] '[] m a -> m ()
    runMultiRWSTNil_ MultiRWST '[] '[] '[] m a
    k = m (a, (HList '[], HList '[], HList '[])) -> m ()
    forall (f :: * -> *) a. Functor f => f a -> f ()
    void (m (a, (HList '[], HList '[], HList '[])) -> m ())
    -> m (a, (HList '[], HList '[], HList '[])) -> m ()
    forall a b. (a -> b) -> a -> b
    $ StateT (HList '[], HList '[], HList '[]) m a
    -> (HList '[], HList '[], HList '[])
    -> m (a, (HList '[], HList '[], HList '[]))
    forall s (m :: * -> *) a. StateT s m a -> s -> m (a, s)
    runStateT (MultiRWST '[] '[] '[] m a
    -> StateT (HList '[], HList '[], HList '[]) m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    runMultiRWSTRaw MultiRWST '[] '[] '[] m a
    k) (HList '[]
    HNil, HList '[]
    HNil, HList '[]
    HNil)

    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 ()
    withMultiReader :: forall (m :: * -> *) r (rs :: [*]) (w :: [*]) (s :: [*]) a.
    Monad m =>
    r -> MultiRWST (r : rs) w s m a -> MultiRWST rs w s m a
    withMultiReader r
    x MultiRWST (r : rs) w s m a
    k = StateT (HList rs, HList w, HList s) m a -> MultiRWST rs w s m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList rs, HList w, HList s) m a -> MultiRWST rs w s m a)
    -> StateT (HList rs, HList w, HList s) m a -> MultiRWST rs w s m a
    forall a b. (a -> b) -> a -> b
    $ do
      (HList rs
    r, HList w
    w, HList s
    s) <- StateT (HList rs, HList w, HList s) m (HList rs, HList w, HList s)
    forall s (m :: * -> *). MonadState s m => m s
    get
      ~(a
    a, ~(HList (r : rs)
    _, HList w
    w', HList s
    s')) <- m (a, (HList (r : rs), HList w, HList s))
    -> StateT
         (HList rs, HList w, HList s)
         m
         (a, (HList (r : rs), HList w, HList s))
    forall (m :: * -> *) a.
    Monad m =>
    m a -> StateT (HList rs, HList w, HList s) m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (a, (HList (r : rs), HList w, HList s))
     -> StateT
          (HList rs, HList w, HList s)
          m
          (a, (HList (r : rs), HList w, HList s)))
    -> m (a, (HList (r : rs), HList w, HList s))
    -> StateT
         (HList rs, HList w, HList s)
         m
         (a, (HList (r : rs), HList w, HList s))
    forall a b. (a -> b) -> a -> b
    $ StateT (HList (r : rs), HList w, HList s) m a
    -> (HList (r : rs), HList w, HList s)
    -> m (a, (HList (r : rs), HList w, HList s))
    forall s (m :: * -> *) a. StateT s m a -> s -> m (a, s)
    runStateT (MultiRWST (r : rs) w s m a
    -> StateT (HList (r : rs), HList w, HList s) m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    runMultiRWSTRaw MultiRWST (r : rs) w s m a
    k) (r
    x r -> HList rs -> HList (r : rs)
    forall x (xs :: [*]). x -> HList xs -> HList (x : xs)
    :+: HList rs
    r, HList w
    w, HList s
    s)
      (HList rs, HList w, HList s)
    -> StateT (HList rs, HList w, HList s) m ()
    forall s (m :: * -> *). MonadState s m => s -> m ()
    put (HList rs
    r, HList w
    w', HList s
    s')
      a -> StateT (HList rs, HList w, HList s) m a
    forall a. a -> StateT (HList rs, HList w, HList s) m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return a
    a
    withMultiReader_ :: forall (m :: * -> *) r (rs :: [*]) (w :: [*]) (s :: [*]) a.
    (Functor m, Monad m) =>
    r -> MultiRWST (r : rs) w s m a -> MultiRWST rs w s m ()
    withMultiReader_ r
    x MultiRWST (r : rs) w s m a
    k = StateT (HList rs, HList w, HList s) m () -> MultiRWST rs w s m ()
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList rs, HList w, HList s) m () -> MultiRWST rs w s m ())
    -> StateT (HList rs, HList w, HList s) m ()
    -> MultiRWST rs w s m ()
    forall a b. (a -> b) -> a -> b
    $ do
      (HList rs
    r, HList w
    w, HList s
    s) <- StateT (HList rs, HList w, HList s) m (HList rs, HList w, HList s)
    forall s (m :: * -> *). MonadState s m => m s
    get
      ~(HList (r : rs)
    _, HList w
    w', HList s
    s') <- m (HList (r : rs), HList w, HList s)
    -> StateT
         (HList rs, HList w, HList s) m (HList (r : rs), HList w, HList s)
    forall (m :: * -> *) a.
    Monad m =>
    m a -> StateT (HList rs, HList w, HList s) m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (HList (r : rs), HList w, HList s)
     -> StateT
          (HList rs, HList w, HList s) m (HList (r : rs), HList w, HList s))
    -> m (HList (r : rs), HList w, HList s)
    -> StateT
         (HList rs, HList w, HList s) m (HList (r : rs), HList w, HList s)
    forall a b. (a -> b) -> a -> b
    $ StateT (HList (r : rs), HList w, HList s) m a
    -> (HList (r : rs), HList w, HList s)
    -> m (HList (r : rs), HList w, HList s)
    forall (m :: * -> *) s a. Monad m => StateT s m a -> s -> m s
    execStateT (MultiRWST (r : rs) w s m a
    -> StateT (HList (r : rs), HList w, HList s) m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    runMultiRWSTRaw MultiRWST (r : rs) w s m a
    k) (r
    x r -> HList rs -> HList (r : rs)
    forall x (xs :: [*]). x -> HList xs -> HList (x : xs)
    :+: HList rs
    r, HList w
    w, HList s
    s)
      (HList rs, HList w, HList s)
    -> StateT (HList rs, HList w, HList s) m ()
    forall s (m :: * -> *). MonadState s m => s -> m ()
    put (HList rs
    r, HList w
    w', HList s
    s')
    withMultiReaders :: forall (m :: * -> *) (r1 :: [*]) (r2 :: [*]) (w :: [*]) (s :: [*])
           a.
    Monad m =>
    HList r1
    -> MultiRWST (Append r1 r2) w s m a -> MultiRWST r2 w s m a
    withMultiReaders HList r1
    HNil       = MultiRWST r2 w s m a -> MultiRWST r2 w s m a
    MultiRWST (Append r1 r2) w s m a -> MultiRWST r2 w s m a
    forall a. a -> a
    id
    withMultiReaders (x
    x :+: HList xs
    xs) = HList xs
    -> MultiRWST (Append xs r2) w s m a -> MultiRWST r2 w s m a
    forall (m :: * -> *) (r1 :: [*]) (r2 :: [*]) (w :: [*]) (s :: [*])
           a.
    Monad m =>
    HList r1
    -> MultiRWST (Append r1 r2) w s m a -> MultiRWST r2 w s m a
    withMultiReaders HList xs
    xs (MultiRWST (Append xs r2) w s m a -> MultiRWST r2 w s m a)
    -> (MultiRWST (x : Append xs r2) w s m a
        -> MultiRWST (Append xs r2) w s m a)
    -> MultiRWST (x : Append xs r2) w s m a
    -> MultiRWST r2 w s m a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . x
    -> MultiRWST (x : Append xs r2) w s m a
    -> MultiRWST (Append xs r2) w s m a
    forall (m :: * -> *) r (rs :: [*]) (w :: [*]) (s :: [*]) a.
    Monad m =>
    r -> MultiRWST (r : rs) w s m a -> MultiRWST rs w s m a
    withMultiReader x
    x
    withMultiReaders_ :: forall (m :: * -> *) (r1 :: [*]) (r2 :: [*]) (w :: [*]) (s :: [*])
           a.
    (Functor m, Monad m) =>
    HList r1
    -> MultiRWST (Append r1 r2) w s m a -> MultiRWST r2 w s m ()
    withMultiReaders_ HList r1
    HNil       = MultiRWST r2 w s m a -> MultiRWST r2 w s m ()
    MultiRWST (Append r1 r2) w s m a -> MultiRWST r2 w s m ()
    forall (f :: * -> *) a. Functor f => f a -> f ()
    void
    withMultiReaders_ (x
    x :+: HList xs
    xs) = HList xs
    -> MultiRWST (Append xs r2) w s m a -> MultiRWST r2 w s m ()
    forall (m :: * -> *) (r1 :: [*]) (r2 :: [*]) (w :: [*]) (s :: [*])
           a.
    (Functor m, Monad m) =>
    HList r1
    -> MultiRWST (Append r1 r2) w s m a -> MultiRWST r2 w s m ()
    withMultiReaders_ HList xs
    xs (MultiRWST (Append xs r2) w s m a -> MultiRWST r2 w s m ())
    -> (MultiRWST (x : Append xs r2) w s m a
        -> MultiRWST (Append xs r2) w s m a)
    -> MultiRWST (x : Append xs r2) w s m a
    -> MultiRWST r2 w s m ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . x
    -> MultiRWST (x : Append xs r2) w s m a
    -> MultiRWST (Append xs r2) w s m a
    forall (m :: * -> *) r (rs :: [*]) (w :: [*]) (s :: [*]) a.
    Monad m =>
    r -> MultiRWST (r : rs) w s m a -> MultiRWST rs w s m a
    withMultiReader x
    x

    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)
    withMultiWriter :: forall w (m :: * -> *) (r :: [*]) (ws :: [*]) (s :: [*]) a.
    (Monoid w, Monad m) =>
    MultiRWST r (w : ws) s m a -> MultiRWST r ws s m (a, w)
    withMultiWriter = MultiRWST r (w : ws) s m a -> MultiRWST r ws s m (a, w)
    forall w (m :: * -> *) (r :: [*]) (ws :: [*]) (s :: [*]) a.
    (Monoid w, Monad m) =>
    MultiRWST r (w : ws) s m a -> MultiRWST r ws s m (a, w)
    withMultiWriterAW
    withMultiWriterAW :: forall w (m :: * -> *) (r :: [*]) (ws :: [*]) (s :: [*]) a.
    (Monoid w, Monad m) =>
    MultiRWST r (w : ws) s m a -> MultiRWST r ws s m (a, w)
    withMultiWriterAW MultiRWST r (w : ws) s m a
    k = StateT (HList r, HList ws, HList s) m (a, w)
    -> MultiRWST r ws s m (a, w)
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList ws, HList s) m (a, w)
     -> MultiRWST r ws s m (a, w))
    -> StateT (HList r, HList ws, HList s) m (a, w)
    -> MultiRWST r ws s m (a, w)
    forall a b. (a -> b) -> a -> b
    $ do
      (HList r
    r, HList ws
    w, HList s
    s) <- StateT (HList r, HList ws, HList s) m (HList r, HList ws, HList s)
    forall s (m :: * -> *). MonadState s m => m s
    get
      ~(a
    a, ~(HList r
    _, HList (w : ws)
    w', HList s
    s')) <- m (a, (HList r, HList (w : ws), HList s))
    -> StateT
         (HList r, HList ws, HList s)
         m
         (a, (HList r, HList (w : ws), HList s))
    forall (m :: * -> *) a.
    Monad m =>
    m a -> StateT (HList r, HList ws, HList s) m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (a, (HList r, HList (w : ws), HList s))
     -> StateT
          (HList r, HList ws, HList s)
          m
          (a, (HList r, HList (w : ws), HList s)))
    -> m (a, (HList r, HList (w : ws), HList s))
    -> StateT
         (HList r, HList ws, HList s)
         m
         (a, (HList r, HList (w : ws), HList s))
    forall a b. (a -> b) -> a -> b
    $ StateT (HList r, HList (w : ws), HList s) m a
    -> (HList r, HList (w : ws), HList s)
    -> m (a, (HList r, HList (w : ws), HList s))
    forall s (m :: * -> *) a. StateT s m a -> s -> m (a, s)
    runStateT (MultiRWST r (w : ws) s m a
    -> StateT (HList r, HList (w : ws), HList s) m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    runMultiRWSTRaw MultiRWST r (w : ws) s m a
    k) (HList r
    r, w
    forall a. Monoid a => a
    mempty w -> HList ws -> HList (w : ws)
    forall x (xs :: [*]). x -> HList xs -> HList (x : xs)
    :+: HList ws
    w, HList s
    s)
      case HList (w : ws)
    w' of
        x
    x' :+: HList xs
    wr' -> do
          (HList r, HList xs, HList s)
    -> StateT (HList r, HList ws, HList s) m ()
    forall s (m :: * -> *). MonadState s m => s -> m ()
    put (HList r
    r, HList xs
    wr', HList s
    s')
          (a, w) -> StateT (HList r, HList ws, HList s) m (a, w)
    forall a. a -> StateT (HList r, HList ws, HList s) m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (a
    a, w
    x
    x')
    withMultiWriterWA :: forall w (m :: * -> *) (r :: [*]) (ws :: [*]) (s :: [*]) a.
    (Monoid w, Monad m) =>
    MultiRWST r (w : ws) s m a -> MultiRWST r ws s m (w, a)
    withMultiWriterWA MultiRWST r (w : ws) s m a
    k = StateT (HList r, HList ws, HList s) m (w, a)
    -> MultiRWST r ws s m (w, a)
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList ws, HList s) m (w, a)
     -> MultiRWST r ws s m (w, a))
    -> StateT (HList r, HList ws, HList s) m (w, a)
    -> MultiRWST r ws s m (w, a)
    forall a b. (a -> b) -> a -> b
    $ do
      (HList r
    r, HList ws
    w, HList s
    s) <- StateT (HList r, HList ws, HList s) m (HList r, HList ws, HList s)
    forall s (m :: * -> *). MonadState s m => m s
    get
      ~(a
    a, ~(HList r
    _, HList (w : ws)
    w', HList s
    s')) <- m (a, (HList r, HList (w : ws), HList s))
    -> StateT
         (HList r, HList ws, HList s)
         m
         (a, (HList r, HList (w : ws), HList s))
    forall (m :: * -> *) a.
    Monad m =>
    m a -> StateT (HList r, HList ws, HList s) m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (a, (HList r, HList (w : ws), HList s))
     -> StateT
          (HList r, HList ws, HList s)
          m
          (a, (HList r, HList (w : ws), HList s)))
    -> m (a, (HList r, HList (w : ws), HList s))
    -> StateT
         (HList r, HList ws, HList s)
         m
         (a, (HList r, HList (w : ws), HList s))
    forall a b. (a -> b) -> a -> b
    $ StateT (HList r, HList (w : ws), HList s) m a
    -> (HList r, HList (w : ws), HList s)
    -> m (a, (HList r, HList (w : ws), HList s))
    forall s (m :: * -> *) a. StateT s m a -> s -> m (a, s)
    runStateT (MultiRWST r (w : ws) s m a
    -> StateT (HList r, HList (w : ws), HList s) m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    runMultiRWSTRaw MultiRWST r (w : ws) s m a
    k) (HList r
    r, w
    forall a. Monoid a => a
    mempty w -> HList ws -> HList (w : ws)
    forall x (xs :: [*]). x -> HList xs -> HList (x : xs)
    :+: HList ws
    w, HList s
    s)
      case HList (w : ws)
    w' of
        x
    x' :+: HList xs
    wr' -> do
          (HList r, HList xs, HList s)
    -> StateT (HList r, HList ws, HList s) m ()
    forall s (m :: * -> *). MonadState s m => s -> m ()
    put (HList r
    r, HList xs
    wr', HList s
    s')
          (w, a) -> StateT (HList r, HList ws, HList s) m (w, a)
    forall a. a -> StateT (HList r, HList ws, HList s) m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (w
    x
    x', a
    a)
    withMultiWriterW :: forall w (m :: * -> *) (r :: [*]) (ws :: [*]) (s :: [*]) a.
    (Monoid w, Monad m) =>
    MultiRWST r (w : ws) s m a -> MultiRWST r ws s m w
    withMultiWriterW MultiRWST r (w : ws) s m a
    k = StateT (HList r, HList ws, HList s) m w -> MultiRWST r ws s m w
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList ws, HList s) m w -> MultiRWST r ws s m w)
    -> StateT (HList r, HList ws, HList s) m w -> MultiRWST r ws s m w
    forall a b. (a -> b) -> a -> b
    $ do
      (HList r
    r, HList ws
    w, HList s
    s) <- StateT (HList r, HList ws, HList s) m (HList r, HList ws, HList s)
    forall s (m :: * -> *). MonadState s m => m s
    get
      ~(HList r
    _, HList (w : ws)
    w', HList s
    s') <- m (HList r, HList (w : ws), HList s)
    -> StateT
         (HList r, HList ws, HList s) m (HList r, HList (w : ws), HList s)
    forall (m :: * -> *) a.
    Monad m =>
    m a -> StateT (HList r, HList ws, HList s) m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (HList r, HList (w : ws), HList s)
     -> StateT
          (HList r, HList ws, HList s) m (HList r, HList (w : ws), HList s))
    -> m (HList r, HList (w : ws), HList s)
    -> StateT
         (HList r, HList ws, HList s) m (HList r, HList (w : ws), HList s)
    forall a b. (a -> b) -> a -> b
    $ StateT (HList r, HList (w : ws), HList s) m a
    -> (HList r, HList (w : ws), HList s)
    -> m (HList r, HList (w : ws), HList s)
    forall (m :: * -> *) s a. Monad m => StateT s m a -> s -> m s
    execStateT (MultiRWST r (w : ws) s m a
    -> StateT (HList r, HList (w : ws), HList s) m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    runMultiRWSTRaw MultiRWST r (w : ws) s m a
    k) (HList r
    r, w
    forall a. Monoid a => a
    mempty w -> HList ws -> HList (w : ws)
    forall x (xs :: [*]). x -> HList xs -> HList (x : xs)
    :+: HList ws
    w, HList s
    s)
      case HList (w : ws)
    w' of
        x
    x' :+: HList xs
    wr' -> do
          (HList r, HList xs, HList s)
    -> StateT (HList r, HList ws, HList s) m ()
    forall s (m :: * -> *). MonadState s m => s -> m ()
    put (HList r
    r, HList xs
    wr', HList s
    s')
          w -> StateT (HList r, HList ws, HList s) m w
    forall a. a -> StateT (HList r, HList ws, HList s) m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return w
    x
    x'
    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)
    withMultiWriters = MultiRWST r (Append w1 w2) s m a
    -> MultiRWST r w2 s m (a, HList w1)
    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
    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)
    withMultiWritersAW MultiRWST r (Append w1 w2) s m a
    k = StateT (HList r, HList w2, HList s) m (a, HList w1)
    -> MultiRWST r w2 s m (a, HList w1)
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList w2, HList s) m (a, HList w1)
     -> MultiRWST r w2 s m (a, HList w1))
    -> StateT (HList r, HList w2, HList s) m (a, HList w1)
    -> MultiRWST r w2 s m (a, HList w1)
    forall a b. (a -> b) -> a -> b
    $ do
      (HList r
    r, HList w2
    w, HList s
    s) <- StateT (HList r, HList w2, HList s) m (HList r, HList w2, HList s)
    forall s (m :: * -> *). MonadState s m => m s
    get
      ~(a
    a, ~(HList r
    _, HList (Append w1 w2)
    w', HList s
    s')) <- m (a, (HList r, HList (Append w1 w2), HList s))
    -> StateT
         (HList r, HList w2, HList s)
         m
         (a, (HList r, HList (Append w1 w2), HList s))
    forall (m :: * -> *) a.
    Monad m =>
    m a -> StateT (HList r, HList w2, HList s) m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (a, (HList r, HList (Append w1 w2), HList s))
     -> StateT
          (HList r, HList w2, HList s)
          m
          (a, (HList r, HList (Append w1 w2), HList s)))
    -> m (a, (HList r, HList (Append w1 w2), HList s))
    -> StateT
         (HList r, HList w2, HList s)
         m
         (a, (HList r, HList (Append w1 w2), HList s))
    forall a b. (a -> b) -> a -> b
    $ StateT (HList r, HList (Append w1 w2), HList s) m a
    -> (HList r, HList (Append w1 w2), HList s)
    -> m (a, (HList r, HList (Append w1 w2), HList s))
    forall s (m :: * -> *) a. StateT s m a -> s -> m (a, s)
    runStateT (MultiRWST r (Append w1 w2) s m a
    -> StateT (HList r, HList (Append w1 w2), HList s) m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    runMultiRWSTRaw MultiRWST r (Append w1 w2) s m a
    k) (HList r
    r, HList w1 -> HList w2 -> HList (Append w1 w2)
    forall (ts1 :: [*]) (ts2 :: [*]).
    HList ts1 -> HList ts2 -> HList (Append ts1 ts2)
    hAppend (HList w1
    forall a. Monoid a => a
    mempty :: HList w1) HList w2
    w, HList s
    s)
      let (HList w1
    o, HList w2
    wr') = HList (Append w1 w2) -> (HList w1, HList w2)
    forall (l1 :: [*]) (l2 :: [*]).
    HInit l1 =>
    HList (Append l1 l2) -> (HList l1, HList l2)
    forall (l2 :: [*]). HList (Append w1 l2) -> (HList w1, HList l2)
    hSplit HList (Append w1 w2)
    w'
      (HList r, HList w2, HList s)
    -> StateT (HList r, HList w2, HList s) m ()
    forall s (m :: * -> *). MonadState s m => s -> m ()
    put (HList r
    r, HList w2
    wr', HList s
    s')
      (a, HList w1)
    -> StateT (HList r, HList w2, HList s) m (a, HList w1)
    forall a. a -> StateT (HList r, HList w2, HList s) m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (a
    a, HList w1
    o)
    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)
    withMultiWritersWA MultiRWST r (Append w1 w2) s m a
    k = StateT (HList r, HList w2, HList s) m (HList w1, a)
    -> MultiRWST r w2 s m (HList w1, a)
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList w2, HList s) m (HList w1, a)
     -> MultiRWST r w2 s m (HList w1, a))
    -> StateT (HList r, HList w2, HList s) m (HList w1, a)
    -> MultiRWST r w2 s m (HList w1, a)
    forall a b. (a -> b) -> a -> b
    $ do
      (HList r
    r, HList w2
    w, HList s
    s) <- StateT (HList r, HList w2, HList s) m (HList r, HList w2, HList s)
    forall s (m :: * -> *). MonadState s m => m s
    get
      ~(a
    a, ~(HList r
    _, HList (Append w1 w2)
    w', HList s
    s')) <- m (a, (HList r, HList (Append w1 w2), HList s))
    -> StateT
         (HList r, HList w2, HList s)
         m
         (a, (HList r, HList (Append w1 w2), HList s))
    forall (m :: * -> *) a.
    Monad m =>
    m a -> StateT (HList r, HList w2, HList s) m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (a, (HList r, HList (Append w1 w2), HList s))
     -> StateT
          (HList r, HList w2, HList s)
          m
          (a, (HList r, HList (Append w1 w2), HList s)))
    -> m (a, (HList r, HList (Append w1 w2), HList s))
    -> StateT
         (HList r, HList w2, HList s)
         m
         (a, (HList r, HList (Append w1 w2), HList s))
    forall a b. (a -> b) -> a -> b
    $ StateT (HList r, HList (Append w1 w2), HList s) m a
    -> (HList r, HList (Append w1 w2), HList s)
    -> m (a, (HList r, HList (Append w1 w2), HList s))
    forall s (m :: * -> *) a. StateT s m a -> s -> m (a, s)
    runStateT (MultiRWST r (Append w1 w2) s m a
    -> StateT (HList r, HList (Append w1 w2), HList s) m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    runMultiRWSTRaw MultiRWST r (Append w1 w2) s m a
    k) (HList r
    r, HList w1 -> HList w2 -> HList (Append w1 w2)
    forall (ts1 :: [*]) (ts2 :: [*]).
    HList ts1 -> HList ts2 -> HList (Append ts1 ts2)
    hAppend (HList w1
    forall a. Monoid a => a
    mempty :: HList w1) HList w2
    w, HList s
    s)
      let (HList w1
    o, HList w2
    wr') = HList (Append w1 w2) -> (HList w1, HList w2)
    forall (l1 :: [*]) (l2 :: [*]).
    HInit l1 =>
    HList (Append l1 l2) -> (HList l1, HList l2)
    forall (l2 :: [*]). HList (Append w1 l2) -> (HList w1, HList l2)
    hSplit HList (Append w1 w2)
    w'
      (HList r, HList w2, HList s)
    -> StateT (HList r, HList w2, HList s) m ()
    forall s (m :: * -> *). MonadState s m => s -> m ()
    put (HList r
    r, HList w2
    wr', HList s
    s')
      (HList w1, a)
    -> StateT (HList r, HList w2, HList s) m (HList w1, a)
    forall a. a -> StateT (HList r, HList w2, HList s) m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (HList w1
    o, a
    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)
    withMultiWritersW MultiRWST r (Append w1 w2) s m a
    k = StateT (HList r, HList w2, HList s) m (HList w1)
    -> MultiRWST r w2 s m (HList w1)
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList w2, HList s) m (HList w1)
     -> MultiRWST r w2 s m (HList w1))
    -> StateT (HList r, HList w2, HList s) m (HList w1)
    -> MultiRWST r w2 s m (HList w1)
    forall a b. (a -> b) -> a -> b
    $ do
      (HList r
    r, HList w2
    w, HList s
    s) <- StateT (HList r, HList w2, HList s) m (HList r, HList w2, HList s)
    forall s (m :: * -> *). MonadState s m => m s
    get
      ~(HList r
    _, HList (Append w1 w2)
    w', HList s
    s') <- m (HList r, HList (Append w1 w2), HList s)
    -> StateT
         (HList r, HList w2, HList s)
         m
         (HList r, HList (Append w1 w2), HList s)
    forall (m :: * -> *) a.
    Monad m =>
    m a -> StateT (HList r, HList w2, HList s) m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (HList r, HList (Append w1 w2), HList s)
     -> StateT
          (HList r, HList w2, HList s)
          m
          (HList r, HList (Append w1 w2), HList s))
    -> m (HList r, HList (Append w1 w2), HList s)
    -> StateT
         (HList r, HList w2, HList s)
         m
         (HList r, HList (Append w1 w2), HList s)
    forall a b. (a -> b) -> a -> b
    $ StateT (HList r, HList (Append w1 w2), HList s) m a
    -> (HList r, HList (Append w1 w2), HList s)
    -> m (HList r, HList (Append w1 w2), HList s)
    forall (m :: * -> *) s a. Monad m => StateT s m a -> s -> m s
    execStateT (MultiRWST r (Append w1 w2) s m a
    -> StateT (HList r, HList (Append w1 w2), HList s) m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    runMultiRWSTRaw MultiRWST r (Append w1 w2) s m a
    k) (HList r
    r, HList w1 -> HList w2 -> HList (Append w1 w2)
    forall (ts1 :: [*]) (ts2 :: [*]).
    HList ts1 -> HList ts2 -> HList (Append ts1 ts2)
    hAppend (HList w1
    forall a. Monoid a => a
    mempty :: HList w1) HList w2
    w, HList s
    s)
      let (HList w1
    o, HList w2
    wr') = HList (Append w1 w2) -> (HList w1, HList w2)
    forall (l1 :: [*]) (l2 :: [*]).
    HInit l1 =>
    HList (Append l1 l2) -> (HList l1, HList l2)
    forall (l2 :: [*]). HList (Append w1 l2) -> (HList w1, HList l2)
    hSplit HList (Append w1 w2)
    w'
      (HList r, HList w2, HList s)
    -> StateT (HList r, HList w2, HList s) m ()
    forall s (m :: * -> *). MonadState s m => s -> m ()
    put (HList r
    r, HList w2
    wr', HList s
    s')
      HList w1 -> StateT (HList r, HList w2, HList s) m (HList w1)
    forall a. a -> StateT (HList r, HList w2, HList s) m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return HList w1
    o

    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 ()
    withMultiState :: forall (m :: * -> *) s (r :: [*]) (w :: [*]) (ss :: [*]) a.
    Monad m =>
    s -> MultiRWST r w (s : ss) m a -> MultiRWST r w ss m (a, s)
    withMultiState = s -> MultiRWST r w (s : ss) m a -> MultiRWST r w ss m (a, s)
    forall (m :: * -> *) s (r :: [*]) (w :: [*]) (ss :: [*]) a.
    Monad m =>
    s -> MultiRWST r w (s : ss) m a -> MultiRWST r w ss m (a, s)
    withMultiStateAS
    withMultiStateAS :: forall (m :: * -> *) s (r :: [*]) (w :: [*]) (ss :: [*]) a.
    Monad m =>
    s -> MultiRWST r w (s : ss) m a -> MultiRWST r w ss m (a, s)
    withMultiStateAS s
    x MultiRWST r w (s : ss) m a
    k = StateT (HList r, HList w, HList ss) m (a, s)
    -> MultiRWST r w ss m (a, s)
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList w, HList ss) m (a, s)
     -> MultiRWST r w ss m (a, s))
    -> StateT (HList r, HList w, HList ss) m (a, s)
    -> MultiRWST r w ss m (a, s)
    forall a b. (a -> b) -> a -> b
    $ do
      ~(HList r
    r, HList w
    w, HList ss
    s) <- StateT (HList r, HList w, HList ss) m (HList r, HList w, HList ss)
    forall s (m :: * -> *). MonadState s m => m s
    get
      ~(a
    a, ~(HList r
    _, HList w
    w', HList (s : ss)
    s')) <- m (a, (HList r, HList w, HList (s : ss)))
    -> StateT
         (HList r, HList w, HList ss)
         m
         (a, (HList r, HList w, HList (s : ss)))
    forall (m :: * -> *) a.
    Monad m =>
    m a -> StateT (HList r, HList w, HList ss) m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (a, (HList r, HList w, HList (s : ss)))
     -> StateT
          (HList r, HList w, HList ss)
          m
          (a, (HList r, HList w, HList (s : ss))))
    -> m (a, (HList r, HList w, HList (s : ss)))
    -> StateT
         (HList r, HList w, HList ss)
         m
         (a, (HList r, HList w, HList (s : ss)))
    forall a b. (a -> b) -> a -> b
    $ StateT (HList r, HList w, HList (s : ss)) m a
    -> (HList r, HList w, HList (s : ss))
    -> m (a, (HList r, HList w, HList (s : ss)))
    forall s (m :: * -> *) a. StateT s m a -> s -> m (a, s)
    runStateT (MultiRWST r w (s : ss) m a
    -> StateT (HList r, HList w, HList (s : ss)) m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    runMultiRWSTRaw MultiRWST r w (s : ss) m a
    k) (HList r
    r, HList w
    w, (s
    x s -> HList ss -> HList (s : ss)
    forall x (xs :: [*]). x -> HList xs -> HList (x : xs)
    :+: HList ss
    s))
      case HList (s : ss)
    s' of
        x
    x' :+: HList xs
    sr' -> do
          (HList r, HList w, HList xs)
    -> StateT (HList r, HList w, HList ss) m ()
    forall s (m :: * -> *). MonadState s m => s -> m ()
    put (HList r
    r, HList w
    w', HList xs
    sr')
          (a, s) -> StateT (HList r, HList w, HList ss) m (a, s)
    forall a. a -> StateT (HList r, HList w, HList ss) m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (a
    a, s
    x
    x')
    withMultiStateSA :: forall (m :: * -> *) s (r :: [*]) (w :: [*]) (ss :: [*]) a.
    Monad m =>
    s -> MultiRWST r w (s : ss) m a -> MultiRWST r w ss m (s, a)
    withMultiStateSA s
    x MultiRWST r w (s : ss) m a
    k = StateT (HList r, HList w, HList ss) m (s, a)
    -> MultiRWST r w ss m (s, a)
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList w, HList ss) m (s, a)
     -> MultiRWST r w ss m (s, a))
    -> StateT (HList r, HList w, HList ss) m (s, a)
    -> MultiRWST r w ss m (s, a)
    forall a b. (a -> b) -> a -> b
    $ do
      ~(HList r
    r, HList w
    w, HList ss
    s) <- StateT (HList r, HList w, HList ss) m (HList r, HList w, HList ss)
    forall s (m :: * -> *). MonadState s m => m s
    get
      ~(a
    a, ~(HList r
    _, HList w
    w', HList (s : ss)
    s')) <- m (a, (HList r, HList w, HList (s : ss)))
    -> StateT
         (HList r, HList w, HList ss)
         m
         (a, (HList r, HList w, HList (s : ss)))
    forall (m :: * -> *) a.
    Monad m =>
    m a -> StateT (HList r, HList w, HList ss) m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (a, (HList r, HList w, HList (s : ss)))
     -> StateT
          (HList r, HList w, HList ss)
          m
          (a, (HList r, HList w, HList (s : ss))))
    -> m (a, (HList r, HList w, HList (s : ss)))
    -> StateT
         (HList r, HList w, HList ss)
         m
         (a, (HList r, HList w, HList (s : ss)))
    forall a b. (a -> b) -> a -> b
    $ StateT (HList r, HList w, HList (s : ss)) m a
    -> (HList r, HList w, HList (s : ss))
    -> m (a, (HList r, HList w, HList (s : ss)))
    forall s (m :: * -> *) a. StateT s m a -> s -> m (a, s)
    runStateT (MultiRWST r w (s : ss) m a
    -> StateT (HList r, HList w, HList (s : ss)) m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    runMultiRWSTRaw MultiRWST r w (s : ss) m a
    k) (HList r
    r, HList w
    w, (s
    x s -> HList ss -> HList (s : ss)
    forall x (xs :: [*]). x -> HList xs -> HList (x : xs)
    :+: HList ss
    s))
      case HList (s : ss)
    s' of
        x
    x' :+: HList xs
    sr' -> do
          (HList r, HList w, HList xs)
    -> StateT (HList r, HList w, HList ss) m ()
    forall s (m :: * -> *). MonadState s m => s -> m ()
    put (HList r
    r, HList w
    w', HList xs
    sr')
          (s, a) -> StateT (HList r, HList w, HList ss) m (s, a)
    forall a. a -> StateT (HList r, HList w, HList ss) m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (s
    x
    x', a
    a)
    withMultiStateA :: forall (m :: * -> *) s (r :: [*]) (w :: [*]) (ss :: [*]) a.
    Monad m =>
    s -> MultiRWST r w (s : ss) m a -> MultiRWST r w ss m a
    withMultiStateA s
    x MultiRWST r w (s : ss) m a
    k = StateT (HList r, HList w, HList ss) m a -> MultiRWST r w ss m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList w, HList ss) m a -> MultiRWST r w ss m a)
    -> StateT (HList r, HList w, HList ss) m a -> MultiRWST r w ss m a
    forall a b. (a -> b) -> a -> b
    $ do
      ~(HList r
    r, HList w
    w, HList ss
    s) <- StateT (HList r, HList w, HList ss) m (HList r, HList w, HList ss)
    forall s (m :: * -> *). MonadState s m => m s
    get
      ~(a
    a, ~(HList r
    _, HList w
    w', HList (s : ss)
    s')) <- m (a, (HList r, HList w, HList (s : ss)))
    -> StateT
         (HList r, HList w, HList ss)
         m
         (a, (HList r, HList w, HList (s : ss)))
    forall (m :: * -> *) a.
    Monad m =>
    m a -> StateT (HList r, HList w, HList ss) m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (a, (HList r, HList w, HList (s : ss)))
     -> StateT
          (HList r, HList w, HList ss)
          m
          (a, (HList r, HList w, HList (s : ss))))
    -> m (a, (HList r, HList w, HList (s : ss)))
    -> StateT
         (HList r, HList w, HList ss)
         m
         (a, (HList r, HList w, HList (s : ss)))
    forall a b. (a -> b) -> a -> b
    $ StateT (HList r, HList w, HList (s : ss)) m a
    -> (HList r, HList w, HList (s : ss))
    -> m (a, (HList r, HList w, HList (s : ss)))
    forall s (m :: * -> *) a. StateT s m a -> s -> m (a, s)
    runStateT (MultiRWST r w (s : ss) m a
    -> StateT (HList r, HList w, HList (s : ss)) m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    runMultiRWSTRaw MultiRWST r w (s : ss) m a
    k) (HList r
    r, HList w
    w, (s
    x s -> HList ss -> HList (s : ss)
    forall x (xs :: [*]). x -> HList xs -> HList (x : xs)
    :+: HList ss
    s))
      case HList (s : ss)
    s' of
        x
    _ :+: HList xs
    sr' -> do
          (HList r, HList w, HList xs)
    -> StateT (HList r, HList w, HList ss) m ()
    forall s (m :: * -> *). MonadState s m => s -> m ()
    put (HList r
    r, HList w
    w', HList xs
    sr')
          a -> StateT (HList r, HList w, HList ss) m a
    forall a. a -> StateT (HList r, HList w, HList ss) m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return a
    a
    withMultiStateS :: forall (m :: * -> *) s (r :: [*]) (w :: [*]) (ss :: [*]) a.
    Monad m =>
    s -> MultiRWST r w (s : ss) m a -> MultiRWST r w ss m s
    withMultiStateS s
    x MultiRWST r w (s : ss) m a
    k = StateT (HList r, HList w, HList ss) m s -> MultiRWST r w ss m s
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList w, HList ss) m s -> MultiRWST r w ss m s)
    -> StateT (HList r, HList w, HList ss) m s -> MultiRWST r w ss m s
    forall a b. (a -> b) -> a -> b
    $ do
      ~(HList r
    r, HList w
    w, HList ss
    s) <- StateT (HList r, HList w, HList ss) m (HList r, HList w, HList ss)
    forall s (m :: * -> *). MonadState s m => m s
    get
      ~(HList r
    _, HList w
    w', HList (s : ss)
    s') <- m (HList r, HList w, HList (s : ss))
    -> StateT
         (HList r, HList w, HList ss) m (HList r, HList w, HList (s : ss))
    forall (m :: * -> *) a.
    Monad m =>
    m a -> StateT (HList r, HList w, HList ss) m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (HList r, HList w, HList (s : ss))
     -> StateT
          (HList r, HList w, HList ss) m (HList r, HList w, HList (s : ss)))
    -> m (HList r, HList w, HList (s : ss))
    -> StateT
         (HList r, HList w, HList ss) m (HList r, HList w, HList (s : ss))
    forall a b. (a -> b) -> a -> b
    $ StateT (HList r, HList w, HList (s : ss)) m a
    -> (HList r, HList w, HList (s : ss))
    -> m (HList r, HList w, HList (s : ss))
    forall (m :: * -> *) s a. Monad m => StateT s m a -> s -> m s
    execStateT (MultiRWST r w (s : ss) m a
    -> StateT (HList r, HList w, HList (s : ss)) m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    runMultiRWSTRaw MultiRWST r w (s : ss) m a
    k) (HList r
    r, HList w
    w, (s
    x s -> HList ss -> HList (s : ss)
    forall x (xs :: [*]). x -> HList xs -> HList (x : xs)
    :+: HList ss
    s))
      case HList (s : ss)
    s' of
        x
    x' :+: HList xs
    sr' -> do
          (HList r, HList w, HList xs)
    -> StateT (HList r, HList w, HList ss) m ()
    forall s (m :: * -> *). MonadState s m => s -> m ()
    put (HList r
    r, HList w
    w', HList xs
    sr')
          s -> StateT (HList r, HList w, HList ss) m s
    forall a. a -> StateT (HList r, HList w, HList ss) m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return s
    x
    x'
    withMultiState_ :: forall (m :: * -> *) s (r :: [*]) (w :: [*]) (ss :: [*]) a.
    (Functor m, Monad m) =>
    s -> MultiRWST r w (s : ss) m a -> MultiRWST r w ss m ()
    withMultiState_ s
    x MultiRWST r w (s : ss) m a
    k = StateT (HList r, HList w, HList ss) m () -> MultiRWST r w ss m ()
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList w, HList ss) m () -> MultiRWST r w ss m ())
    -> StateT (HList r, HList w, HList ss) m ()
    -> MultiRWST r w ss m ()
    forall a b. (a -> b) -> a -> b
    $ do
      ~(HList r
    r, HList w
    w, HList ss
    s) <- StateT (HList r, HList w, HList ss) m (HList r, HList w, HList ss)
    forall s (m :: * -> *). MonadState s m => m s
    get
      ~(HList r
    _, HList w
    w', HList (s : ss)
    s') <- m (HList r, HList w, HList (s : ss))
    -> StateT
         (HList r, HList w, HList ss) m (HList r, HList w, HList (s : ss))
    forall (m :: * -> *) a.
    Monad m =>
    m a -> StateT (HList r, HList w, HList ss) m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (HList r, HList w, HList (s : ss))
     -> StateT
          (HList r, HList w, HList ss) m (HList r, HList w, HList (s : ss)))
    -> m (HList r, HList w, HList (s : ss))
    -> StateT
         (HList r, HList w, HList ss) m (HList r, HList w, HList (s : ss))
    forall a b. (a -> b) -> a -> b
    $ StateT (HList r, HList w, HList (s : ss)) m a
    -> (HList r, HList w, HList (s : ss))
    -> m (HList r, HList w, HList (s : ss))
    forall (m :: * -> *) s a. Monad m => StateT s m a -> s -> m s
    execStateT (MultiRWST r w (s : ss) m a
    -> StateT (HList r, HList w, HList (s : ss)) m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    runMultiRWSTRaw MultiRWST r w (s : ss) m a
    k) (HList r
    r, HList w
    w, (s
    x s -> HList ss -> HList (s : ss)
    forall x (xs :: [*]). x -> HList xs -> HList (x : xs)
    :+: HList ss
    s))
      case HList (s : ss)
    s' of x
    _ :+: HList xs
    sr' -> (HList r, HList w, HList xs)
    -> StateT (HList r, HList w, HList ss) m ()
    forall s (m :: * -> *). MonadState s m => s -> m ()
    put (HList r
    r, HList w
    w', HList xs
    sr')
    withMultiStates :: forall (m :: * -> *) (s1 :: [*]) (r :: [*]) (w :: [*]) (s2 :: [*])
           a.
    Monad m =>
    HList s1
    -> MultiRWST r w (Append s1 s2) m a
    -> MultiRWST r w s2 m (a, HList s1)
    withMultiStates                = HList s1
    -> MultiRWST r w (Append s1 s2) m a
    -> MultiRWST r w s2 m (a, HList s1)
    forall (m :: * -> *) (s1 :: [*]) (r :: [*]) (w :: [*]) (s2 :: [*])
           a.
    Monad m =>
    HList s1
    -> MultiRWST r w (Append s1 s2) m a
    -> MultiRWST r w s2 m (a, HList s1)
    withMultiStatesAS
    withMultiStatesAS :: forall (m :: * -> *) (s1 :: [*]) (r :: [*]) (w :: [*]) (s2 :: [*])
           a.
    Monad m =>
    HList s1
    -> MultiRWST r w (Append s1 s2) m a
    -> MultiRWST r w s2 m (a, HList s1)
    withMultiStatesAS HList s1
    HNil       MultiRWST r w (Append s1 s2) m a
    k = do a
    a <- MultiRWST r w s2 m a
    MultiRWST r w (Append s1 s2) m a
    k; (a, HList s1) -> MultiRWST r w s2 m (a, HList s1)
    forall a. a -> MultiRWST r w s2 m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (a
    a, HList s1
    HList '[]
    HNil)
    withMultiStatesAS (x
    x :+: HList xs
    xs) MultiRWST r w (Append s1 s2) m a
    k = do
      ~(~(a
    a, x
    x'), HList xs
    xs') <- HList xs
    -> MultiRWST r w (Append xs s2) m (a, x)
    -> MultiRWST r w s2 m ((a, x), HList xs)
    forall (m :: * -> *) (s1 :: [*]) (r :: [*]) (w :: [*]) (s2 :: [*])
           a.
    Monad m =>
    HList s1
    -> MultiRWST r w (Append s1 s2) m a
    -> MultiRWST r w s2 m (a, HList s1)
    withMultiStates HList xs
    xs (MultiRWST r w (Append xs s2) m (a, x)
     -> MultiRWST r w s2 m ((a, x), HList xs))
    -> MultiRWST r w (Append xs s2) m (a, x)
    -> MultiRWST r w s2 m ((a, x), HList xs)
    forall a b. (a -> b) -> a -> b
    $ x
    -> MultiRWST r w (x : Append xs s2) m a
    -> MultiRWST r w (Append xs s2) m (a, x)
    forall (m :: * -> *) s (r :: [*]) (w :: [*]) (ss :: [*]) a.
    Monad m =>
    s -> MultiRWST r w (s : ss) m a -> MultiRWST r w ss m (a, s)
    withMultiState x
    x MultiRWST r w (x : Append xs s2) m a
    MultiRWST r w (Append s1 s2) m a
    k
      (a, HList s1) -> MultiRWST r w s2 m (a, HList s1)
    forall a. a -> MultiRWST r w s2 m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (a
    a, x
    x' x -> HList xs -> HList (x : xs)
    forall x (xs :: [*]). x -> HList xs -> HList (x : xs)
    :+: HList xs
    xs')
    withMultiStatesSA :: forall (m :: * -> *) (s1 :: [*]) (r :: [*]) (w :: [*]) (s2 :: [*])
           a.
    Monad m =>
    HList s1
    -> MultiRWST r w (Append s1 s2) m a
    -> MultiRWST r w s2 m (HList s1, a)
    withMultiStatesSA HList s1
    HNil       MultiRWST r w (Append s1 s2) m a
    k = do a
    a <- MultiRWST r w s2 m a
    MultiRWST r w (Append s1 s2) m a
    k; (HList s1, a) -> MultiRWST r w s2 m (HList s1, a)
    forall a. a -> MultiRWST r w s2 m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (HList s1
    HList '[]
    HNil, a
    a)
    withMultiStatesSA (x
    x :+: HList xs
    xs) MultiRWST r w (Append s1 s2) m a
    k = do
      ~(~(a
    a, x
    x'), HList xs
    xs') <- HList xs
    -> MultiRWST r w (Append xs s2) m (a, x)
    -> MultiRWST r w s2 m ((a, x), HList xs)
    forall (m :: * -> *) (s1 :: [*]) (r :: [*]) (w :: [*]) (s2 :: [*])
           a.
    Monad m =>
    HList s1
    -> MultiRWST r w (Append s1 s2) m a
    -> MultiRWST r w s2 m (a, HList s1)
    withMultiStates HList xs
    xs (MultiRWST r w (Append xs s2) m (a, x)
     -> MultiRWST r w s2 m ((a, x), HList xs))
    -> MultiRWST r w (Append xs s2) m (a, x)
    -> MultiRWST r w s2 m ((a, x), HList xs)
    forall a b. (a -> b) -> a -> b
    $ x
    -> MultiRWST r w (x : Append xs s2) m a
    -> MultiRWST r w (Append xs s2) m (a, x)
    forall (m :: * -> *) s (r :: [*]) (w :: [*]) (ss :: [*]) a.
    Monad m =>
    s -> MultiRWST r w (s : ss) m a -> MultiRWST r w ss m (a, s)
    withMultiState x
    x MultiRWST r w (x : Append xs s2) m a
    MultiRWST r w (Append s1 s2) m a
    k
      (HList s1, a) -> MultiRWST r w s2 m (HList s1, a)
    forall a. a -> MultiRWST r w s2 m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (x
    x' x -> HList xs -> HList (x : xs)
    forall x (xs :: [*]). x -> HList xs -> HList (x : xs)
    :+: HList xs
    xs', a
    a)
    withMultiStatesA :: forall (m :: * -> *) (s1 :: [*]) (r :: [*]) (w :: [*]) (s2 :: [*])
           a.
    Monad m =>
    HList s1
    -> MultiRWST r w (Append s1 s2) m a -> MultiRWST r w s2 m a
    withMultiStatesA HList s1
    HNil       = MultiRWST r w s2 m a -> MultiRWST r w s2 m a
    MultiRWST r w (Append s1 s2) m a -> MultiRWST r w s2 m a
    forall a. a -> a
    id
    withMultiStatesA (x
    x :+: HList xs
    xs) = HList xs
    -> MultiRWST r w (Append xs s2) m a -> MultiRWST r w s2 m a
    forall (m :: * -> *) (s1 :: [*]) (r :: [*]) (w :: [*]) (s2 :: [*])
           a.
    Monad m =>
    HList s1
    -> MultiRWST r w (Append s1 s2) m a -> MultiRWST r w s2 m a
    withMultiStatesA HList xs
    xs (MultiRWST r w (Append xs s2) m a -> MultiRWST r w s2 m a)
    -> (MultiRWST r w (x : Append xs s2) m a
        -> MultiRWST r w (Append xs s2) m a)
    -> MultiRWST r w (x : Append xs s2) m a
    -> MultiRWST r w s2 m a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . x
    -> MultiRWST r w (x : Append xs s2) m a
    -> MultiRWST r w (Append xs s2) m a
    forall (m :: * -> *) s (r :: [*]) (w :: [*]) (ss :: [*]) a.
    Monad m =>
    s -> MultiRWST r w (s : ss) m a -> MultiRWST r w ss m a
    withMultiStateA x
    x
    withMultiStatesS :: forall (m :: * -> *) (s1 :: [*]) (r :: [*]) (w :: [*]) (s2 :: [*])
           a.
    Monad m =>
    HList s1
    -> MultiRWST r w (Append s1 s2) m a
    -> MultiRWST r w s2 m (HList s1)
    withMultiStatesS HList s1
    HNil       MultiRWST r w (Append s1 s2) m a
    k = MultiRWST r w s2 m a
    MultiRWST r w (Append s1 s2) m a
    k MultiRWST r w s2 m a
    -> MultiRWST r w s2 m (HList s1) -> MultiRWST r w s2 m (HList s1)
    forall a b.
    MultiRWST r w s2 m a
    -> MultiRWST r w s2 m b -> MultiRWST r w s2 m b
    forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
    >> HList s1 -> MultiRWST r w s2 m (HList s1)
    forall a. a -> MultiRWST r w s2 m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return HList s1
    HList '[]
    HNil
    withMultiStatesS (x
    x :+: HList xs
    xs) MultiRWST r w (Append s1 s2) m a
    k = do
      ~(x
    x', HList xs
    xs') <- HList xs
    -> MultiRWST r w (Append xs s2) m x
    -> MultiRWST r w s2 m (x, HList xs)
    forall (m :: * -> *) (s1 :: [*]) (r :: [*]) (w :: [*]) (s2 :: [*])
           a.
    Monad m =>
    HList s1
    -> MultiRWST r w (Append s1 s2) m a
    -> MultiRWST r w s2 m (a, HList s1)
    withMultiStates HList xs
    xs (MultiRWST r w (Append xs s2) m x
     -> MultiRWST r w s2 m (x, HList xs))
    -> MultiRWST r w (Append xs s2) m x
    -> MultiRWST r w s2 m (x, HList xs)
    forall a b. (a -> b) -> a -> b
    $ x
    -> MultiRWST r w (x : Append xs s2) m a
    -> MultiRWST r w (Append xs s2) m x
    forall (m :: * -> *) s (r :: [*]) (w :: [*]) (ss :: [*]) a.
    Monad m =>
    s -> MultiRWST r w (s : ss) m a -> MultiRWST r w ss m s
    withMultiStateS x
    x MultiRWST r w (x : Append xs s2) m a
    MultiRWST r w (Append s1 s2) m a
    k
      HList s1 -> MultiRWST r w s2 m (HList s1)
    forall a. a -> MultiRWST r w s2 m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (x
    x' x -> HList xs -> HList (x : xs)
    forall x (xs :: [*]). x -> HList xs -> HList (x : xs)
    :+: HList xs
    xs')
    withMultiStates_ :: forall (m :: * -> *) (s1 :: [*]) (r :: [*]) (w :: [*]) (s2 :: [*])
           a.
    (Functor m, Monad m) =>
    HList s1
    -> MultiRWST r w (Append s1 s2) m a -> MultiRWST r w s2 m ()
    withMultiStates_ HList s1
    HNil       = MultiRWST r w s2 m a -> MultiRWST r w s2 m ()
    MultiRWST r w (Append s1 s2) m a -> MultiRWST r w s2 m ()
    forall (f :: * -> *) a. Functor f => f a -> f ()
    void
    withMultiStates_ (x
    x :+: HList xs
    xs) = HList xs
    -> MultiRWST r w (Append xs s2) m () -> MultiRWST r w s2 m ()
    forall (m :: * -> *) (s1 :: [*]) (r :: [*]) (w :: [*]) (s2 :: [*])
           a.
    (Functor m, Monad m) =>
    HList s1
    -> MultiRWST r w (Append s1 s2) m a -> MultiRWST r w s2 m ()
    withMultiStates_ HList xs
    xs (MultiRWST r w (Append xs s2) m () -> MultiRWST r w s2 m ())
    -> (MultiRWST r w (x : Append xs s2) m a
        -> MultiRWST r w (Append xs s2) m ())
    -> MultiRWST r w (x : Append xs s2) m a
    -> MultiRWST r w s2 m ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . x
    -> MultiRWST r w (x : Append xs s2) m a
    -> MultiRWST r w (Append xs s2) m ()
    forall (m :: * -> *) s (r :: [*]) (w :: [*]) (ss :: [*]) a.
    (Functor m, Monad m) =>
    s -> MultiRWST r w (s : ss) m a -> MultiRWST r w ss m ()
    withMultiState_ x
    x

    withoutMultiReader :: Monad m => MultiRWST rs w s m a -> MultiRWST (r ': rs) w s m a
    withoutMultiReader :: forall (m :: * -> *) (rs :: [*]) (w :: [*]) (s :: [*]) a r.
    Monad m =>
    MultiRWST rs w s m a -> MultiRWST (r : rs) w s m a
    withoutMultiReader MultiRWST rs w s m a
    k = StateT (HList (r : rs), HList w, HList s) m a
    -> MultiRWST (r : rs) w s m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList (r : rs), HList w, HList s) m a
     -> MultiRWST (r : rs) w s m a)
    -> StateT (HList (r : rs), HList w, HList s) m a
    -> MultiRWST (r : rs) w s m a
    forall a b. (a -> b) -> a -> b
    $ StateT
      (HList (r : rs), HList w, HList s)
      m
      (HList (r : rs), HList w, HList s)
    forall s (m :: * -> *). MonadState s m => m s
    get StateT
      (HList (r : rs), HList w, HList s)
      m
      (HList (r : rs), HList w, HList s)
    -> ((HList (r : rs), HList w, HList s)
        -> StateT (HList (r : rs), HList w, HList s) m a)
    -> StateT (HList (r : rs), HList w, HList s) m a
    forall a b.
    StateT (HList (r : rs), HList w, HList s) m a
    -> (a -> StateT (HList (r : rs), HList w, HList s) m b)
    -> StateT (HList (r : rs), HList w, HList s) m b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= \case
      (rs :: HList (r : rs)
    rs@(x
    _ :+: HList xs
    rr), HList w
    w, HList s
    s) -> do
        ~(a
    a, ~(HList rs
    _, HList w
    w', HList s
    s')) <- m (a, (HList rs, HList w, HList s))
    -> StateT
         (HList (r : rs), HList w, HList s)
         m
         (a, (HList rs, HList w, HList s))
    forall (m :: * -> *) a.
    Monad m =>
    m a -> StateT (HList (r : rs), HList w, HList s) m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (a, (HList rs, HList w, HList s))
     -> StateT
          (HList (r : rs), HList w, HList s)
          m
          (a, (HList rs, HList w, HList s)))
    -> m (a, (HList rs, HList w, HList s))
    -> StateT
         (HList (r : rs), HList w, HList s)
         m
         (a, (HList rs, HList w, HList s))
    forall a b. (a -> b) -> a -> b
    $ StateT (HList rs, HList w, HList s) m a
    -> (HList rs, HList w, HList s)
    -> m (a, (HList rs, HList w, HList s))
    forall s (m :: * -> *) a. StateT s m a -> s -> m (a, s)
    runStateT (MultiRWST rs w s m a -> StateT (HList rs, HList w, HList s) m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    runMultiRWSTRaw MultiRWST rs w s m a
    k) (HList rs
    HList xs
    rr, HList w
    w, HList s
    s)
        (HList (r : rs), HList w, HList s)
    -> StateT (HList (r : rs), HList w, HList s) m ()
    forall s (m :: * -> *). MonadState s m => s -> m ()
    put (HList (r : rs)
    rs, HList w
    w', HList s
    s')
        a -> StateT (HList (r : rs), HList w, HList s) m a
    forall a. a -> StateT (HList (r : rs), HList w, HList s) m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return a
    a

    withoutMultiState :: Monad m => MultiRWST r w ss m a -> MultiRWST r w (s ': ss) m a
    withoutMultiState :: forall (m :: * -> *) (r :: [*]) (w :: [*]) (ss :: [*]) a s.
    Monad m =>
    MultiRWST r w ss m a -> MultiRWST r w (s : ss) m a
    withoutMultiState MultiRWST r w ss m a
    k = StateT (HList r, HList w, HList (s : ss)) m a
    -> MultiRWST r w (s : ss) m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList w, HList (s : ss)) m a
     -> MultiRWST r w (s : ss) m a)
    -> StateT (HList r, HList w, HList (s : ss)) m a
    -> MultiRWST r w (s : ss) m a
    forall a b. (a -> b) -> a -> b
    $ StateT
      (HList r, HList w, HList (s : ss))
      m
      (HList r, HList w, HList (s : ss))
    forall s (m :: * -> *). MonadState s m => m s
    get StateT
      (HList r, HList w, HList (s : ss))
      m
      (HList r, HList w, HList (s : ss))
    -> ((HList r, HList w, HList (s : ss))
        -> StateT (HList r, HList w, HList (s : ss)) m a)
    -> StateT (HList r, HList w, HList (s : ss)) m a
    forall a b.
    StateT (HList r, HList w, HList (s : ss)) m a
    -> (a -> StateT (HList r, HList w, HList (s : ss)) m b)
    -> StateT (HList r, HList w, HList (s : ss)) m b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= \case
      (HList r
    r, HList w
    w, x
    s :+: HList xs
    sr) -> do
        ~(a
    a, ~(HList r
    _, HList w
    w', HList ss
    s')) <- m (a, (HList r, HList w, HList ss))
    -> StateT
         (HList r, HList w, HList (s : ss))
         m
         (a, (HList r, HList w, HList ss))
    forall (m :: * -> *) a.
    Monad m =>
    m a -> StateT (HList r, HList w, HList (s : ss)) m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (a, (HList r, HList w, HList ss))
     -> StateT
          (HList r, HList w, HList (s : ss))
          m
          (a, (HList r, HList w, HList ss)))
    -> m (a, (HList r, HList w, HList ss))
    -> StateT
         (HList r, HList w, HList (s : ss))
         m
         (a, (HList r, HList w, HList ss))
    forall a b. (a -> b) -> a -> b
    $ StateT (HList r, HList w, HList ss) m a
    -> (HList r, HList w, HList ss)
    -> m (a, (HList r, HList w, HList ss))
    forall s (m :: * -> *) a. StateT s m a -> s -> m (a, s)
    runStateT (MultiRWST r w ss m a -> StateT (HList r, HList w, HList ss) m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    runMultiRWSTRaw MultiRWST r w ss m a
    k) (HList r
    r, HList w
    w, HList ss
    HList xs
    sr)
        (HList r, HList w, HList (x : ss))
    -> StateT (HList r, HList w, HList (s : ss)) m ()
    forall s (m :: * -> *). MonadState s m => s -> m ()
    put (HList r
    r, HList w
    w', x
    s x -> HList ss -> HList (x : ss)
    forall x (xs :: [*]). x -> HList xs -> HList (x : xs)
    :+: HList ss
    s')
        a -> StateT (HList r, HList w, HList (s : ss)) m a
    forall a. a -> StateT (HList r, HList w, HList (s : ss)) m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return a
    a

    inflateReader :: (Monad m, ContainsType r rs)
                  => ReaderT r m a
                  -> MultiRWST rs w s m a
    inflateReader :: forall (m :: * -> *) r (rs :: [*]) a (w :: [*]) (s :: [*]).
    (Monad m, ContainsType r rs) =>
    ReaderT r m a -> MultiRWST rs w s m a
    inflateReader ReaderT r m a
    k = MultiRWST rs w s m r
    forall a (m :: * -> *). MonadMultiReader a m => m a
    mAsk MultiRWST rs w s m r
    -> (r -> MultiRWST rs w s m a) -> MultiRWST rs w s m a
    forall a b.
    MultiRWST rs w s m a
    -> (a -> MultiRWST rs w s m b) -> MultiRWST rs w s m b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= m a -> MultiRWST rs w s m a
    forall (m :: * -> *) a. Monad m => m a -> MultiRWST rs w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m a -> MultiRWST rs w s m a)
    -> (r -> m a) -> r -> MultiRWST rs w s m a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . ReaderT r m a -> r -> m a
    forall r (m :: * -> *) a. ReaderT r m a -> r -> m a
    runReaderT ReaderT r m a
    k
    inflateMultiReader :: Monad m => MultiReaderT r m a -> MultiRWST r w s m a
    inflateMultiReader :: forall (m :: * -> *) (r :: [*]) a (w :: [*]) (s :: [*]).
    Monad m =>
    MultiReaderT r m a -> MultiRWST r w s m a
    inflateMultiReader MultiReaderT r m a
    k = do
      HList r
    r <- MultiRWST r w s m (HList r)
    forall (m :: * -> *) (r :: [*]) (w :: [*]) (s :: [*]).
    Monad m =>
    MultiRWST r w s m (HList r)
    mGetRawR
      m a -> MultiRWST r w s m a
    forall (m :: * -> *) a. Monad m => m a -> MultiRWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m a -> MultiRWST r w s m a) -> m a -> MultiRWST r w s m a
    forall a b. (a -> b) -> a -> b
    $ HList r -> MultiReaderT r m a -> m a
    forall (m :: * -> *) (r :: [*]) a.
    Monad m =>
    HList r -> MultiReaderT r m a -> m a
    runMultiReaderT HList r
    r MultiReaderT r m a
    k
    inflateWriter :: (Monad m, ContainsType w ws, Monoid w)
                  => WriterT w m a
                  -> MultiRWST r ws s m a
    inflateWriter :: forall (m :: * -> *) w (ws :: [*]) a (r :: [*]) (s :: [*]).
    (Monad m, ContainsType w ws, Monoid w) =>
    WriterT w m a -> MultiRWST r ws s m a
    inflateWriter WriterT w m a
    k = do
      ~(a
    x, w
    w) <- m (a, w) -> MultiRWST r ws s m (a, w)
    forall (m :: * -> *) a. Monad m => m a -> MultiRWST r ws s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (a, w) -> MultiRWST r ws s m (a, w))
    -> m (a, w) -> MultiRWST r ws s m (a, w)
    forall a b. (a -> b) -> a -> b
    $ WriterT w m a -> m (a, w)
    forall w (m :: * -> *) a. WriterT w m a -> m (a, w)
    runWriterT WriterT w m a
    k
      w -> MultiRWST r ws s m ()
    forall a (m :: * -> *). MonadMultiWriter a m => a -> m ()
    mTell w
    w
      a -> MultiRWST r ws s m a
    forall a. a -> MultiRWST r ws s m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return a
    x
    inflateMultiWriter :: (Functor m, Monad m, Monoid (HList w))
                       => MultiWriterT w m a
                       -> MultiRWST r w s m a
    inflateMultiWriter :: forall (m :: * -> *) (w :: [*]) a (r :: [*]) (s :: [*]).
    (Functor m, Monad m, Monoid (HList w)) =>
    MultiWriterT w m a -> MultiRWST r w s m a
    inflateMultiWriter MultiWriterT w m a
    k = do
      ~(a
    x, HList w
    w) <- m (a, HList w) -> MultiRWST r w s m (a, HList w)
    forall (m :: * -> *) a. Monad m => m a -> MultiRWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (a, HList w) -> MultiRWST r w s m (a, HList w))
    -> m (a, HList w) -> MultiRWST r w s m (a, HList w)
    forall a b. (a -> b) -> a -> b
    $ MultiWriterT w m a -> m (a, HList w)
    forall (w :: [*]) (m :: * -> *) a.
    (Monoid (HList w), Functor m) =>
    MultiWriterT w m a -> m (a, HList w)
    runMultiWriterT MultiWriterT w m a
    k
      HList w -> MultiRWST r w s m ()
    forall (m :: * -> *) (w :: [*]) (r :: [*]) (s :: [*]).
    Monad m =>
    HList w -> MultiRWST r w s m ()
    mPutRawW HList w
    w
      a -> MultiRWST r w s m a
    forall a. a -> MultiRWST r w s m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return a
    x
    inflateState :: (Monad m, MonadMultiState s (t m), MonadTrans t)
                 => StateT s m a
                 -> t m a
    inflateState :: forall (m :: * -> *) s (t :: (* -> *) -> * -> *) a.
    (Monad m, MonadMultiState s (t m), MonadTrans t) =>
    StateT s m a -> t m a
    inflateState StateT s m a
    k = do
      s
    s <- t m s
    forall a (m :: * -> *). MonadMultiGet a m => m a
    mGet
      ~(a
    x, s
    s') <- m (a, s) -> t m (a, s)
    forall (m :: * -> *) a. Monad m => m a -> t m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (a, s) -> t m (a, s)) -> m (a, s) -> t m (a, s)
    forall a b. (a -> b) -> a -> b
    $ StateT s m a -> s -> m (a, s)
    forall s (m :: * -> *) a. StateT s m a -> s -> m (a, s)
    runStateT StateT s m a
    k s
    s
      s -> t m ()
    forall a (m :: * -> *). MonadMultiState a m => a -> m ()
    mSet s
    s'
      a -> t m a
    forall a. a -> t m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return a
    x
    inflateMultiState :: (Functor m, Monad m)
                      => MultiStateT s m a
                      -> MultiRWST r w s m a
    inflateMultiState :: forall (m :: * -> *) (s :: [*]) a (r :: [*]) (w :: [*]).
    (Functor m, Monad m) =>
    MultiStateT s m a -> MultiRWST r w s m a
    inflateMultiState MultiStateT s m a
    k = do
      HList s
    s <- MultiRWST r w s m (HList s)
    forall (m :: * -> *) (r :: [*]) (w :: [*]) (s :: [*]).
    Monad m =>
    MultiRWST r w s m (HList s)
    mGetRawS
      ~(a
    x, HList s
    s') <- m (a, HList s) -> MultiRWST r w s m (a, HList s)
    forall (m :: * -> *) a. Monad m => m a -> MultiRWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (a, HList s) -> MultiRWST r w s m (a, HList s))
    -> m (a, HList s) -> MultiRWST r w s m (a, HList s)
    forall a b. (a -> b) -> a -> b
    $ HList s -> MultiStateT s m a -> m (a, HList s)
    forall (m :: * -> *) (s :: [*]) a.
    Functor m =>
    HList s -> MultiStateT s m a -> m (a, HList s)
    runMultiStateT HList s
    s MultiStateT s m a
    k
      HList s -> MultiRWST r w s m ()
    forall (m :: * -> *) (s :: [*]) (r :: [*]) (w :: [*]).
    Monad m =>
    HList s -> MultiRWST r w s m ()
    mPutRawS HList s
    s'
      a -> MultiRWST r w s m a
    forall a. a -> MultiRWST r w s m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return a
    x

    mGetRawR :: Monad m => MultiRWST r w s m (HList r)
    mPutRawR :: Monad m => HList r -> MultiRWST r w s m ()
    mGetRawW :: Monad m => MultiRWST r w s m (HList w)
    mPutRawW :: Monad m => HList w -> MultiRWST r w s m ()
    mGetRawS :: Monad m => MultiRWST r w s m (HList s)
    mPutRawS :: Monad m => HList s -> MultiRWST r w s m ()
    mGetRawR :: forall (m :: * -> *) (r :: [*]) (w :: [*]) (s :: [*]).
    Monad m =>
    MultiRWST r w s m (HList r)
    mGetRawR = (\(HList r
    r, HList w
    _, HList s
    _) -> HList r
    r) ((HList r, HList w, HList s) -> HList r)
    -> MultiRWST r w s m (HList r, HList w, HList s)
    -> MultiRWST r w s m (HList r)
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    `liftM` StateT (HList r, HList w, HList s) m (HList r, HList w, HList s)
    -> MultiRWST r w s m (HList r, HList w, HList s)
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST StateT (HList r, HList w, HList s) m (HList r, HList w, HList s)
    forall s (m :: * -> *). MonadState s m => m s
    get
    mPutRawR :: forall (m :: * -> *) (r :: [*]) (w :: [*]) (s :: [*]).
    Monad m =>
    HList r -> MultiRWST r w s m ()
    mPutRawR HList r
    r = StateT (HList r, HList w, HList s) m () -> MultiRWST r w s m ()
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList w, HList s) m () -> MultiRWST r w s m ())
    -> StateT (HList r, HList w, HList s) m () -> MultiRWST r w s m ()
    forall a b. (a -> b) -> a -> b
    $ do
      ~(HList r
    _, HList w
    w, HList s
    s) <- StateT (HList r, HList w, HList s) m (HList r, HList w, HList s)
    forall s (m :: * -> *). MonadState s m => m s
    get
      (HList r, HList w, HList s)
    -> StateT (HList r, HList w, HList s) m ()
    forall s (m :: * -> *). MonadState s m => s -> m ()
    put (HList r
    r, HList w
    w, HList s
    s)
    mGetRawW :: forall (m :: * -> *) (r :: [*]) (w :: [*]) (s :: [*]).
    Monad m =>
    MultiRWST r w s m (HList w)
    mGetRawW = (\(HList r
    _, HList w
    w, HList s
    _) -> HList w
    w) ((HList r, HList w, HList s) -> HList w)
    -> MultiRWST r w s m (HList r, HList w, HList s)
    -> MultiRWST r w s m (HList w)
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    `liftM` StateT (HList r, HList w, HList s) m (HList r, HList w, HList s)
    -> MultiRWST r w s m (HList r, HList w, HList s)
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST StateT (HList r, HList w, HList s) m (HList r, HList w, HList s)
    forall s (m :: * -> *). MonadState s m => m s
    get
    mPutRawW :: forall (m :: * -> *) (w :: [*]) (r :: [*]) (s :: [*]).
    Monad m =>
    HList w -> MultiRWST r w s m ()
    mPutRawW HList w
    w = StateT (HList r, HList w, HList s) m () -> MultiRWST r w s m ()
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList w, HList s) m () -> MultiRWST r w s m ())
    -> StateT (HList r, HList w, HList s) m () -> MultiRWST r w s m ()
    forall a b. (a -> b) -> a -> b
    $ do
      ~(HList r
    r, HList w
    _, HList s
    s) <- StateT (HList r, HList w, HList s) m (HList r, HList w, HList s)
    forall s (m :: * -> *). MonadState s m => m s
    get
      (HList r, HList w, HList s)
    -> StateT (HList r, HList w, HList s) m ()
    forall s (m :: * -> *). MonadState s m => s -> m ()
    put (HList r
    r, HList w
    w, HList s
    s)
    mGetRawS :: forall (m :: * -> *) (r :: [*]) (w :: [*]) (s :: [*]).
    Monad m =>
    MultiRWST r w s m (HList s)
    mGetRawS = (\(HList r
    _, HList w
    _, HList s
    s) -> HList s
    s) ((HList r, HList w, HList s) -> HList s)
    -> MultiRWST r w s m (HList r, HList w, HList s)
    -> MultiRWST r w s m (HList s)
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    `liftM` StateT (HList r, HList w, HList s) m (HList r, HList w, HList s)
    -> MultiRWST r w s m (HList r, HList w, HList s)
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST StateT (HList r, HList w, HList s) m (HList r, HList w, HList s)
    forall s (m :: * -> *). MonadState s m => m s
    get
    mPutRawS :: forall (m :: * -> *) (s :: [*]) (r :: [*]) (w :: [*]).
    Monad m =>
    HList s -> MultiRWST r w s m ()
    mPutRawS HList s
    s = StateT (HList r, HList w, HList s) m () -> MultiRWST r w s m ()
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList w, HList s) m () -> MultiRWST r w s m ())
    -> StateT (HList r, HList w, HList s) m () -> MultiRWST r w s m ()
    forall a b. (a -> b) -> a -> b
    $ do
      ~(HList r
    r, HList w
    w, HList s
    _) <- StateT (HList r, HList w, HList s) m (HList r, HList w, HList s)
    forall s (m :: * -> *). MonadState s m => m s
    get
      (HList r, HList w, HList s)
    -> StateT (HList r, HList w, HList s) m ()
    forall s (m :: * -> *). MonadState s m => s -> m ()
    put (HList r
    r, HList w
    w, HList s
    s)

    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'
    mapMultiRWST :: forall ss (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a
           (m' :: * -> *) a'.
    (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'
    mapMultiRWST m (a, ss) -> m' (a', ss)
    f = StateT (HList r, HList w, HList s) m' a' -> MultiRWST r w s m' a'
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList w, HList s) m' a' -> MultiRWST r w s m' a')
    -> (MultiRWST r w s m a
        -> StateT (HList r, HList w, HList s) m' a')
    -> MultiRWST r w s m a
    -> MultiRWST r w s m' a'
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (m (a, (HList r, HList w, HList s))
     -> m' (a', (HList r, HList w, HList s)))
    -> StateT (HList r, HList w, HList s) m a
    -> StateT (HList r, HList w, HList s) m' a'
    forall (m :: * -> *) a s (n :: * -> *) b.
    (m (a, s) -> n (b, s)) -> StateT s m a -> StateT s n b
    mapStateT m (a, ss) -> m' (a', ss)
    m (a, (HList r, HList w, HList s))
    -> m' (a', (HList r, HList w, HList s))
    f (StateT (HList r, HList w, HList s) m a
     -> StateT (HList r, HList w, HList s) m' a')
    -> (MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a)
    -> MultiRWST r w s m a
    -> StateT (HList r, HList w, HList s) m' a'
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    runMultiRWSTRaw

    -- foreign lifting instances

    instance MonadIO m => MonadIO (MultiRWST r w s m) where
      liftIO :: forall a. IO a -> MultiRWST r w s m a
    liftIO = m a -> MultiRWST r w s m a
    forall (m :: * -> *) a. Monad m => m a -> MultiRWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m a -> MultiRWST r w s m a)
    -> (IO a -> m a) -> IO a -> MultiRWST r w s m a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . IO a -> m a
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO

    instance (Functor m, Applicative m, MonadPlus m) => Alternative (MultiRWST r w s m) where
      empty :: forall a. MultiRWST r w s m a
    empty = m a -> MultiRWST r w s m a
    forall (m :: * -> *) a. Monad m => m a -> MultiRWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift m a
    forall a. m a
    forall (m :: * -> *) a. MonadPlus m => m a
    mzero
      MultiRWST StateT (HList r, HList w, HList s) m a
    m <|> :: forall a.
    MultiRWST r w s m a -> MultiRWST r w s m a -> MultiRWST r w s m a
    <|> MultiRWST StateT (HList r, HList w, HList s) m a
    n = StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a)
    -> StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    forall a b. (a -> b) -> a -> b
    $ StateT (HList r, HList w, HList s) m a
    m StateT (HList r, HList w, HList s) m a
    -> StateT (HList r, HList w, HList s) m a
    -> StateT (HList r, HList w, HList s) m a
    forall a.
    StateT (HList r, HList w, HList s) m a
    -> StateT (HList r, HList w, HList s) m a
    -> StateT (HList r, HList w, HList s) m a
    forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
    <|> StateT (HList r, HList w, HList s) m a
    n

    instance MonadPlus m => MonadPlus (MultiRWST r w s m) where
      mzero :: forall a. MultiRWST r w s m a
    mzero = StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a)
    -> StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    forall a b. (a -> b) -> a -> b
    $ StateT (HList r, HList w, HList s) m a
    forall a. StateT (HList r, HList w, HList s) m a
    forall (m :: * -> *) a. MonadPlus m => m a
    mzero
      MultiRWST StateT (HList r, HList w, HList s) m a
    m mplus :: forall a.
    MultiRWST r w s m a -> MultiRWST r w s m a -> MultiRWST r w s m a
    `mplus` MultiRWST StateT (HList r, HList w, HList s) m a
    n = StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a)
    -> StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    forall a b. (a -> b) -> a -> b
    $ StateT (HList r, HList w, HList s) m a
    m StateT (HList r, HList w, HList s) m a
    -> StateT (HList r, HList w, HList s) m a
    -> StateT (HList r, HList w, HList s) m a
    forall a.
    StateT (HList r, HList w, HList s) m a
    -> StateT (HList r, HList w, HList s) m a
    -> StateT (HList r, HList w, HList s) m a
    forall (m :: * -> *) a. MonadPlus m => m a -> m a -> m a
    `mplus` StateT (HList r, HList w, HList s) m a
    n

    instance MonadBase b m => MonadBase b (MultiRWST r w s m) where
      liftBase :: forall α. b α -> MultiRWST r w s m α
    liftBase = b α -> MultiRWST r w s m α
    forall (t :: (* -> *) -> * -> *) (b :: * -> *) (m :: * -> *) α.
    (MonadTrans t, MonadBase b m) =>
    b α -> t m α
    liftBaseDefault

    instance MonadTransControl (MultiRWST r w s) where
      type StT (MultiRWST r w s) a = (a, (HList r, HList w, HList s))
      liftWith :: forall (m :: * -> *) a.
    Monad m =>
    (Run (MultiRWST r w s) -> m a) -> MultiRWST r w s m a
    liftWith Run (MultiRWST r w s) -> m a
    f = StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a)
    -> StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    forall a b. (a -> b) -> a -> b
    $ (Run (StateT (HList r, HList w, HList s)) -> m a)
    -> StateT (HList r, HList w, HList s) m a
    forall (m :: * -> *) a.
    Monad m =>
    (Run (StateT (HList r, HList w, HList s)) -> m a)
    -> StateT (HList r, HList w, HList s) m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTransControl t, Monad m) =>
    (Run t -> m a) -> t m a
    liftWith ((Run (StateT (HList r, HList w, HList s)) -> m a)
     -> StateT (HList r, HList w, HList s) m a)
    -> (Run (StateT (HList r, HList w, HList s)) -> m a)
    -> StateT (HList r, HList w, HList s) m a
    forall a b. (a -> b) -> a -> b
    $ \Run (StateT (HList r, HList w, HList s))
    s -> Run (MultiRWST r w s) -> m a
    f (Run (MultiRWST r w s) -> m a) -> Run (MultiRWST r w s) -> m a
    forall a b. (a -> b) -> a -> b
    $ \MultiRWST r w s n b
    r -> StateT (HList r, HList w, HList s) n b
    -> n (StT (StateT (HList r, HList w, HList s)) b)
    Run (StateT (HList r, HList w, HList s))
    s (StateT (HList r, HList w, HList s) n b
     -> n (StT (StateT (HList r, HList w, HList s)) b))
    -> StateT (HList r, HList w, HList s) n b
    -> n (StT (StateT (HList r, HList w, HList s)) b)
    forall a b. (a -> b) -> a -> b
    $ MultiRWST r w s n b -> StateT (HList r, HList w, HList s) n b
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    MultiRWST r w s m a -> StateT (HList r, HList w, HList s) m a
    runMultiRWSTRaw MultiRWST r w s n b
    r
      restoreT :: forall (m :: * -> *) a.
    Monad m =>
    m (StT (MultiRWST r w s) a) -> MultiRWST r w s m a
    restoreT = StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    forall (r :: [*]) (w :: [*]) (s :: [*]) (m :: * -> *) a.
    StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a
    MultiRWST (StateT (HList r, HList w, HList s) m a -> MultiRWST r w s m a)
    -> (m (a, (HList r, HList w, HList s))
        -> StateT (HList r, HList w, HList s) m a)
    -> m (a, (HList r, HList w, HList s))
    -> MultiRWST r w s m a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . m (a, (HList r, HList w, HList s))
    -> StateT (HList r, HList w, HList s) m a
    m (StT (StateT (HList r, HList w, HList s)) a)
    -> StateT (HList r, HList w, HList s) m a
    forall (m :: * -> *) a.
    Monad m =>
    m (StT (StateT (HList r, HList w, HList s)) a)
    -> StateT (HList r, HList w, HList s) m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTransControl t, Monad m) =>
    m (StT t a) -> t m a
    restoreT

    instance MonadBaseControl b m => MonadBaseControl b (MultiRWST r w s m) where
      type StM (MultiRWST r w s m) a = ComposeSt (MultiRWST r w s) m a
      liftBaseWith :: forall a.
    (RunInBase (MultiRWST r w s m) b -> b a) -> MultiRWST r w s m a
    liftBaseWith = (RunInBaseDefault (MultiRWST r w s) m b -> b a)
    -> MultiRWST r w s m a
    (RunInBase (MultiRWST r w s m) b -> b a) -> MultiRWST r w s m a
    forall (t :: (* -> *) -> * -> *) (b :: * -> *) (m :: * -> *) a.
    (MonadTransControl t, MonadBaseControl b m) =>
    (RunInBaseDefault t m b -> b a) -> t m a
    defaultLiftBaseWith
      restoreM :: forall a. StM (MultiRWST r w s m) a -> MultiRWST r w s m a
    restoreM = ComposeSt (MultiRWST r w s) m a -> MultiRWST r w s m a
    StM (MultiRWST r w s m) a -> MultiRWST r w s m a
    forall (t :: (* -> *) -> * -> *) (b :: * -> *) (m :: * -> *) a.
    (MonadTransControl t, MonadBaseControl b m) =>
    ComposeSt t m a -> t m a
    defaultRestoreM