Writer +Control.Monad.Trans -package

module Control.Monad.Trans.Writer
transformers Control.Monad.Trans.Writer
The WriterT monad transformer. This version is lazy; for a strict version, see Control.Monad.Trans.Writer.Strict, which has the same interface.
type Writer w = WriterT w Identity
transformers Control.Monad.Trans.Writer.Lazy, transformers Control.Monad.Trans.Writer.Strict, mtl Control.Monad.Writer.Lazy, mtl Control.Monad.Writer.Strict
A writer monad parameterized by the type w of output to accumulate. The return function produces the output mempty, while >>= combines the outputs of the subcomputations using mappend.
WriterT :: m (a, w) -> WriterT w m a
transformers Control.Monad.Trans.Writer.Lazy, transformers Control.Monad.Trans.Writer.Strict
newtype WriterT w m a
transformers Control.Monad.Trans.Writer.Lazy, transformers Control.Monad.Trans.Writer.Strict
A writer monad parameterized by: * w - the output to accumulate. * m - The inner monad. The return function produces the output mempty, while >>= combines the outputs of the subcomputations using mappend.
writer :: Monad m => (a, w) -> RWST r w s m a
transformers Control.Monad.Trans.RWS.Lazy, transformers Control.Monad.Trans.RWS.Strict
Construct a writer computation from a (result, output) pair.
writer :: Monad m => (a, w) -> WriterT w m a
transformers Control.Monad.Trans.Writer.Lazy, transformers Control.Monad.Trans.Writer.Strict
Construct a writer computation from a (result, output) pair. (The inverse of runWriter.)
execWriter :: Writer w a -> w
transformers Control.Monad.Trans.Writer.Lazy, transformers Control.Monad.Trans.Writer.Strict, mtl Control.Monad.Writer.Lazy, mtl Control.Monad.Writer.Strict
Extract the output from a writer computation. *  m = snd (runWriter >  
execWriterT :: Monad m => WriterT w m a -> m w
transformers Control.Monad.Trans.Writer.Lazy, transformers Control.Monad.Trans.Writer.Strict, mtl Control.Monad.Writer.Lazy, mtl Control.Monad.Writer.Strict
Extract the output from a writer computation. *  m = liftM snd > (runWriterT  
mapWriter :: ((a, w) -> (b, w')) -> Writer w a -> Writer w' b
transformers Control.Monad.Trans.Writer.Lazy, transformers Control.Monad.Trans.Writer.Strict, mtl Control.Monad.Writer.Lazy, mtl Control.Monad.Writer.Strict
Map both the return value and output of a computation using the given function. *  (mapWriter f m) = f (runWriter >  
mapWriterT :: (m (a, w) -> n (b, w')) -> WriterT w m a -> WriterT w' n b
transformers Control.Monad.Trans.Writer.Lazy, transformers Control.Monad.Trans.Writer.Strict, mtl Control.Monad.Writer.Lazy, mtl Control.Monad.Writer.Strict
Map both the return value and output of a computation using the given function. *  (mapWriterT f m) = f > (runWriterT  
runWriter :: Writer w a -> (a, w)
transformers Control.Monad.Trans.Writer.Lazy, transformers Control.Monad.Trans.Writer.Strict, mtl Control.Monad.Writer.Lazy, mtl Control.Monad.Writer.Strict
Unwrap a writer computation as a (result, output) pair. (The inverse of writer.)
runWriterT :: WriterT w m a -> m (a, w)
transformers Control.Monad.Trans.Writer.Lazy, transformers Control.Monad.Trans.Writer.Strict