Copyright | (c) Andy Gill 2001 (c) Oregon Graduate Institute of Science and Technology 2001 |
---|---|

License | BSD-style (see the file libraries/base/LICENSE) |

Maintainer | libraries@haskell.org |

Stability | experimental |

Portability | non-portable (multi-param classes, functional dependencies) |

Safe Haskell | Safe |

Language | Haskell2010 |

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 (WritType m), Monad m) => MonadWriter m where 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 (ExceptT 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 => (WritType m -> b) -> m a -> m (a, b) Source #