Module
Control.Monad.RWS.Trans
- Package
- purescript-transformers
- Repository
- purescript/purescript-transformers
This module defines the reader-writer-state monad transformer, RWST
.
#RWST Source
newtype RWST r w s m a
The reader-writer-state monad transformer, which combines the operations
of RWST
, WriterT
and StateT
into a single monad transformer.
Constructors
Instances
Newtype (RWST r w s m a) _
(Functor m) => Functor (RWST r w s m)
(Bind m, Monoid w) => Apply (RWST r w s m)
(Alt m) => Alt (RWST r w s m)
(Monoid w, Alternative m, Monad m) => Alternative (RWST r w s m)
(Bind m, Monoid w) => Bind (RWST r w s m)
(Monad m, Monoid w) => Applicative (RWST r w s m)
(Monad m, Monoid w) => Monad (RWST r w s m)
(Monoid w) => MonadTrans (RWST r w s)
Lazy (RWST r w s m a)
(Monoid w, MonadEff eff m) => MonadEff eff (RWST r w s m)
(Monad m, Monoid w) => MonadAsk r (RWST r w s m)
(Monad m, Monoid w) => MonadReader r (RWST r w s m)
(Monad m, Monoid w) => MonadState s (RWST r w s m)
(Monad m, Monoid w) => MonadTell w (RWST r w s m)
(Monad m, Monoid w) => MonadWriter w (RWST r w s m)
(MonadThrow e m, Monoid w) => MonadThrow e (RWST r w s m)
(MonadError e m, Monoid w) => MonadError e (RWST r w s m)
(MonadRec m, Monoid w) => MonadRec (RWST r w s m)
(Plus m) => Plus (RWST r w s m)
Re-exports from Control.Monad.Trans.Class
#MonadTrans Source
class MonadTrans t where
The MonadTrans
type class represents monad transformers.
A monad transformer is a type constructor of kind (* -> *) -> * -> *
, which
takes a Monad
as its first argument, and returns another Monad
.
This allows us to add additional effects to an existing monad. By iterating this process, we create monad transformer stacks, which contain all of the effects required for a particular computation.
The laws state that lift
is a Monad
morphism.
Laws:
lift (pure a) = pure a
lift (do { x <- m ; y }) = do { x <- lift m ; lift y }
Members
- Modules
- Control.
Comonad. Env - Control.
Comonad. Env. Class - Control.
Comonad. Env. Trans - Control.
Comonad. Store - Control.
Comonad. Store. Class - Control.
Comonad. Store. Trans - Control.
Comonad. Traced - Control.
Comonad. Traced. Class - Control.
Comonad. Traced. Trans - Control.
Comonad. Trans. Class - Control.
Monad. Cont - Control.
Monad. Cont. Class - Control.
Monad. Cont. Trans - Control.
Monad. Error. Class - Control.
Monad. Except - Control.
Monad. Except. Trans - Control.
Monad. List. Trans - Control.
Monad. Maybe. Trans - Control.
Monad. RWS - Control.
Monad. RWS. Trans - Control.
Monad. Reader - Control.
Monad. Reader. Class - Control.
Monad. Reader. Trans - Control.
Monad. State - Control.
Monad. State. Class - Control.
Monad. State. Trans - Control.
Monad. Trans. Class - Control.
Monad. Writer - Control.
Monad. Writer. Class - Control.
Monad. Writer. Trans