|
Control.Monad.Trans.Writer.Strict | Portability | portable | Stability | experimental | Maintainer | libraries@haskell.org |
|
|
|
|
|
Description |
Strict writer monads.
|
|
Synopsis |
|
type Writer w = WriterT w Identity | | writer :: (a, w) -> Writer w a | | runWriter :: Writer w a -> (a, w) | | execWriter :: Writer w a -> w | | mapWriter :: ((a, w) -> (b, w')) -> Writer w a -> Writer w' b | | newtype WriterT w m a = WriterT {} | | execWriterT :: Monad m => WriterT w m a -> m w | | mapWriterT :: (m (a, w) -> n (b, w')) -> WriterT w m a -> WriterT w' n b | | tell :: (Monoid w, Monad m) => w -> WriterT w m () | | listen :: (Monoid w, Monad m) => WriterT w m a -> WriterT w m (a, w) | | pass :: (Monoid w, Monad m) => WriterT w m (a, w -> w) -> WriterT w m a | | listens :: (Monoid w, Monad m) => (w -> b) -> WriterT w m a -> WriterT w m (a, b) | | censor :: (Monoid w, Monad m) => (w -> w) -> WriterT w m a -> WriterT w m a | | liftCallCC :: Monoid w => ((((a, w) -> m (b, w)) -> m (a, w)) -> m (a, w)) -> ((a -> WriterT w m b) -> WriterT w m a) -> WriterT w m a | | liftCatch :: (m (a, w) -> (e -> m (a, w)) -> m (a, w)) -> WriterT w m a -> (e -> WriterT w m a) -> WriterT w m a |
|
|
|
The Writer monad
|
|
|
|
|
|
|
|
|
|
|
|
The WriterT monad transformer
|
|
|
Constructors | | Instances | |
|
|
|
|
|
|
Writer operations
|
|
|
|
|
|
|
|
|
|
|
|
Lifting other operations
|
|
|
Lift a callCC operation to the new monad.
|
|
|
Lift a catchError operation to the new monad.
|
|
Produced by Haddock version 2.4.2 |