Control.Monad.Trans.Journal

monad-journal-0.7.1: Pure logger typeclass and monad transformer

Copyright | (C) Dimitri Sabadie
License | BSD3
Maintainer | dimitri.sabadie@gmail.com
Stability | stable
Portability | portable
Safe Haskell | None
Language | Haskell2010

Control.Monad.Trans.Journal

Contents

- JournalT monad transformer
- Re-exported

Description

Monad transformer version of `MonadJournal`. `JournalT` provides journaling over a monad.

This modules defines a few useful instances. Check the list below for further information.

Synopsis

- data JournalT w m a
- runJournalT :: (Monoid w, Monad m) => JournalT w m a -> m (a, w)
- evalJournalT :: (Monoid w, Monad m) => JournalT w m a -> m a
- execJournalT :: (Monoid w, Monad m) => JournalT w m a -> m w
- module Control.Monad.Journal.Class

# JournalT monad transformer

data JournalT w m a

Transformer version of `MonadJournal`.

Instances

MonadBase b m => MonadBase b (JournalT w m) |
(Monoid w, MonadBaseControl b m) => MonadBaseControl b (JournalT w m) |
MonadError e m => MonadError e (JournalT w m) |
MonadReader r m => MonadReader r (JournalT w m) |
MonadState s m => MonadState s (JournalT w m) |
MonadWriter w' m => MonadWriter w' (JournalT w m) |
(Monoid w, Monad m) => MonadJournal w (JournalT w m) |
MonadTrans (JournalT w) |
Monoid w => MonadTransControl (JournalT w) |
Monad m => Monad (JournalT w m) |
Functor m => Functor (JournalT w m) |
Monad m => Applicative (JournalT w m) |
MonadPlus m => Alternative (JournalT w m) |
MonadPlus m => MonadPlus (JournalT w m) |
MonadIO m => MonadIO (JournalT w m) |
type StT (JournalT w) a = (a, w) |
type StM (JournalT w m) a = ComposeSt (JournalT w) m a |

runJournalT :: (Monoid w, Monad m) => JournalT w m a -> m (a, w)

Retrieve the value and the log history.

evalJournalT :: (Monoid w, Monad m) => JournalT w m a -> m a

Only retrieve the value.

execJournalT :: (Monoid w, Monad m) => JournalT w m a -> m w

Only retrieve the log history.

# Re-exported

module Control.Monad.Journal.Class