Module
Uncurried.WriterT
- Package
- purescript-uncurried-transformers
- Repository
- PureFunctor/purescript-uncurried-transformers
This module defines the writer monad transformer, WriterT
.
#WriterT Source
newtype WriterT :: Type -> (Type -> Type) -> Type -> Type
newtype WriterT w m a
The writer monad transformer, implemented as a newtype over
RWSET
. Note that it's not recommended to stack newtypes of
RWSET
together as it incurs an indeterminate performance
penalty that would otherwise be solved by just using RWSET
.
Constructors
Instances
(Monoid w) => Functor (WriterT w m)
(Monoid w) => Apply (WriterT w m)
(Monoid w) => Applicative (WriterT w m)
(Monoid w) => Bind (WriterT w m)
(Monoid w) => Monad (WriterT w m)
(Monoid w, MonadEffect m) => MonadEffect (WriterT w m)
(Monoid w) => MonadRec (WriterT w m)
(Monoid w) => MonadTell w (WriterT w m)
(Monoid w) => MonadWriter w (WriterT w m)
(Monoid w) => MonadTrans (WriterT w)
(Monoid w, Semigroup a) => Semigroup (WriterT w m a)
(Monoid w, Monoid a) => Monoid (WriterT w m a)
(Monoid w) => Lazy (WriterT w m a)
(Monoid w, MonadAsk r m) => MonadAsk r (WriterT w m)
(Monoid w, MonadRec m, MonadReader r m) => MonadReader r (WriterT w m)
(Monoid w, MonadState s m) => MonadState s (WriterT w m)
(Monoid w, MonadThrow e m) => MonadThrow e (WriterT w m)
(Monoid w, MonadRec m, MonadError e m) => MonadError e (WriterT w m)
#runWriterT Source
runWriterT :: forall w m a. Monoid w => MonadRec m => WriterT w m a -> m (a /\ w)
Runs a computation inside of WriterT
.
#evalWriterT Source
evalWriterT :: forall w m a. Monoid w => MonadRec m => WriterT w m a -> m a
Runs a computation inside of WriterT
, discarding the final accumulator.
#execWriterT Source
execWriterT :: forall w m a. Monoid w => MonadRec m => WriterT w m a -> m w
Runs a computation inside of WriterT
, discarding the final result.