Portability | portable |
---|---|
Stability | stable |
Maintainer | dimitri.sabadie@gmail.com |
Safe Haskell | Safe-Inferred |
- class (Monoid w, Monad m) => MonadJournal w m | m -> w where
- sink :: (MonadJournal w m, MonadIO m) => (w -> IO ()) -> m ()
- absorb :: MonadJournal w m => (a, w) -> m a
MonadJournal
class (Monoid w, Monad m) => MonadJournal w m | m -> w where
journal :: w -> m ()
Log something.
history :: m w
Extract the logs history.
clear :: m ()
Clear the logs history.
(Monad m, Monoid w, MonadJournal w m) => MonadJournal w (MaybeT m) | |
(Monad m, Monoid w, MonadJournal w m) => MonadJournal w (ListT m) | |
(Monad m, Monoid w, MonadJournal w m) => MonadJournal w (IdentityT m) | |
(Monad m, Monoid w, MonadJournal w m) => MonadJournal w (EitherT e m) | |
(Monad m, Monoid w, Monoid q, MonadJournal w m) => MonadJournal w (WriterT q m) | |
(Monad m, Monoid w, MonadJournal w m) => MonadJournal w (StateT s m) | |
(Monad m, Monoid w, MonadJournal w m) => MonadJournal w (ReaderT r m) | |
(Monoid w, Monad m) => MonadJournal w (JournalT w m) | |
(Monad m, Monoid w, MonadJournal w m) => MonadJournal w (RWST r w s m) |
sink :: (MonadJournal w m, MonadIO m) => (w -> IO ()) -> m ()
Sink all logs history through MonadIO
then clean it.
absorb :: MonadJournal w m => (a, w) -> m a
Absorb a logs history and pass around the value.