| mtl-1.1.0.0: Monad transformer library | Source code | Contents | Index

Control.Monad.Writer.Strict |

Portability | non-portable (multi-param classes, functional dependencies)
Stability | experimental
Maintainer | libraries@haskell.org

Description
Strict writer monads. Inspired by the paper /Functional Programming with Overloading and Higher-Order Polymorphism/, Mark P Jones (http://web.cecs.pdx.edu/~mpj/pubs/springschool.html) Advanced School of Functional Programming, 1995.
Documentation
module Control.Monad.Writer.Class

newtype Writer w a | Source

Constructors

Writer |

runWriter :: (a, w) |

Instances

Monoid w => MonadWriter w (Writer w)
Functor (Writer w)
Monoid w => Monad (Writer w)
Monoid w => MonadFix (Writer w)

execWriter :: Writer w a -> w | Source

mapWriter :: ((a, w) -> (b, w')) -> Writer w a -> Writer w' b | Source

newtype WriterT w m a | Source

Constructors

WriterT |

runWriterT :: (m (a, w)) |

Instances

(Monoid w, MonadError e m) => MonadError e (WriterT w m)
(Monoid w, MonadReader r m) => MonadReader r (WriterT w m)
(Monoid w, MonadState s m) => MonadState s (WriterT w m)
(Monoid w, Monad m) => MonadWriter w (WriterT w m)
Monoid w => MonadTrans (WriterT w)
Monad m => Functor (WriterT w m)
(Monoid w, Monad m) => Monad (WriterT w m)
(Monoid w, MonadCont m) => MonadCont (WriterT w m)
(Monoid w, MonadFix m) => MonadFix (WriterT w m)
(Monoid w, MonadIO m) => MonadIO (WriterT w m)
(Monoid w, MonadPlus m) => MonadPlus (WriterT w m)

execWriterT :: Monad m => WriterT w m a -> m w | Source

mapWriterT :: (m (a, w) -> n (b, w')) -> WriterT w m a -> WriterT w' n b | Source

module Control.Monad
module Control.Monad.Fix
module Control.Monad.Trans
module Data.Monoid
Produced by Haddock version 0.8