|
Control.Monad.Writer | Portability | non-portable ( mulit-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. |
|
|
|
class (Monoid w, Monad m) => MonadWriter w m | m -> w where |
| Methods | pass :: m (a, w -> w) -> m a | | listen :: m a -> m (a, w) | | tell :: w -> m () |
| | Instances | |
|
|
listens :: (MonadWriter w m) => (w -> w) -> m a -> m (a, w) |
|
censor :: (MonadWriter w m) => (w -> w) -> m a -> m a |
|
data 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 |
|
data WriterT w m a |
|
|
runWriterT :: WriterT w m a -> m (a, w) |
|
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.Monoid |
|
module Control.Monad.Fix |
|
module Control.Monad.Trans |
|
Produced by Haddock version 0.3 |