ether-0.3.1.1: Monad transformers and classes

Safe HaskellNone
LanguageHaskell2010

Control.Monad.Ether.Implicit.Writer

Contents

Description

Synopsis

MonadWriter class

writer :: forall m w a. MonadWriter w m => (a, w) -> m a Source

See writer.

tell :: forall m w. MonadWriter w m => w -> m () Source

See tell.

listen :: forall m w a. MonadWriter w m => m a -> m (a, w) Source

See listen.

pass :: forall m w a. MonadWriter w m => m (a, w -> w) -> m a Source

See pass.

listens :: forall m w a b. MonadWriter w m => (w -> b) -> m a -> m (a, b) Source

See listens.

censor :: forall m w a. MonadWriter w m => (w -> w) -> m a -> m a Source

See censor.

The Writer monad

type Writer w = Writer w w Source

See Writer.

runWriter :: Writer w a -> (a, w) Source

The WriterT monad transformer

type WriterT w = WriterT w w Source

See WriterT.

writerT :: m (a, w) -> WriterT w m a Source

See writerT.

runWriterT :: WriterT w m a -> m (a, w) Source

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