Copyright | (c) Andy Gill 2001, (c) Oregon Graduate Institute of Science and Technology, 2001 |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | ross@soi.city.ac.uk |
Stability | experimental |
Portability | non-portable (type families) |
Safe Haskell | Safe |
Language | Haskell98 |
The MonadWriter class.
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
class (Monoid (WriterType m), Monad m) => MonadWriter m where Source #
type WriterType m Source #
tell :: WriterType m -> m () Source #
listen :: m a -> m (a, WriterType m) Source #
pass :: m (a, WriterType m -> WriterType m) -> m a Source #
MonadWriter m => MonadWriter (MaybeT m) Source # | |
(Monoid w, Monad m) => MonadWriter (WriterT w m) Source # | |
(Monoid w, Monad m) => MonadWriter (WriterT w m) Source # | |
MonadWriter m => MonadWriter (StateT s m) Source # | |
MonadWriter m => MonadWriter (StateT s m) Source # | |
MonadWriter m => MonadWriter (IdentityT * m) Source # | |
(Error e, MonadWriter m) => MonadWriter (ErrorT e m) Source # | |
MonadWriter m => MonadWriter (ReaderT * r m) Source # | |
(Monoid w, Monad m) => MonadWriter (RWST r w s m) Source # | |
(Monoid w, Monad m) => MonadWriter (RWST r w s m) Source # | |
listens :: MonadWriter m => (WriterType m -> b) -> m a -> m (a, b) Source #
censor :: MonadWriter m => (WriterType m -> WriterType m) -> m a -> m a Source #