|
| Control.Monad.Writer | | Portability | non-portable (multi-param classes, functional dependencies) | | Stability | experimental | | Maintainer | libraries@haskell.org |
|
|
|
|
|
| Description |
The MonadWriter class.
Inspired by the paper
Functional Programming with Overloading and
Higher-Order Polymorphism,
Mark P Jones (http://www.cse.ogi.edu/~mpj/)
Advanced School of Functional Programming, 1995. |
|
|
| Documentation |
|
| class (Monoid w, Monad m) => MonadWriter w m | m -> w where |
| | Methods | | tell :: w -> m () | | | listen :: m a -> m (a, w) | | | pass :: m (a, w -> w) -> m a |
| | | Instances | |
|
|
| listens :: MonadWriter w m => (w -> b) -> m a -> m (a, b) |
|
| censor :: MonadWriter w m => (w -> w) -> m a -> m a |
|
| newtype Writer w a |
|
|
| execWriter :: Writer w a -> w |
|
| mapWriter :: ((a, w) -> (b, w')) -> Writer w a -> Writer w' b |
|
| newtype WriterT w m a |
|
|
| execWriterT :: Monad m => WriterT w m a -> m w |
|
| mapWriterT :: (m (a, w) -> n (b, w')) -> WriterT w m a -> WriterT w' n b |
|
| module Control.Monad |
|
| module Control.Monad.Fix |
|
| module Control.Monad.Trans |
|
| module Data.Monoid |
|
| Produced by Haddock version 0.6 |