Safe Haskell | Safe |
---|---|
Language | Haskell98 |
This module provides the proxy transformer equivalent of WriterT
.
This module is even stricter than Control.Monad.Trans.Writer.Strict
by
being strict in the accumulated monoid.
The underlying implementation uses the state monad to avoid quadratic blowup from left-associative binds.
- newtype WriterP w p a' a b' b m r = WriterP {
- unWriterP :: w -> p a' a b' b m (r, w)
- runWriterP :: Monoid w => WriterP w p a' a b' b m r -> p a' a b' b m (r, w)
- runWriterK :: Monoid w => (q -> WriterP w p a' a b' b m r) -> q -> p a' a b' b m (r, w)
- execWriterP :: (Monad (p a' a b' b m), Monoid w) => WriterP w p a' a b' b m r -> p a' a b' b m w
- execWriterK :: (Monad (p a' a b' b m), Monoid w) => (q -> WriterP w p a' a b' b m r) -> q -> p a' a b' b m w
- tell :: (Monad (p a' a b' b m), Monoid w) => w -> WriterP w p a' a b' b m ()
- censor :: (Monad (p a' a b' b m), Monoid w) => (w -> w) -> WriterP w p a' a b' b m r -> WriterP w p a' a b' b m r
WriterP
newtype WriterP w p a' a b' b m r Source #
The strict Writer
proxy transformer
Monoid w => ProxyTrans (WriterP w) Source # | |
Channel p => Channel (WriterP w p) Source # | |
MonadTrans (p a' a b' b) => MonadTrans (WriterP w p a' a b' b) Source # | |
MFunctor (p a' a b' b) => MFunctor (WriterP w p a' a b' b) Source # | |
Monad (p a' a b' b m) => Monad (WriterP w p a' a b' b m) Source # | |
Monad (p a' a b' b m) => Functor (WriterP w p a' a b' b m) Source # | |
Monad (p a' a b' b m) => Applicative (WriterP w p a' a b' b m) Source # | |
MonadIO (p a' a b' b m) => MonadIO (WriterP w p a' a b' b m) Source # | |
MonadPlus (p a' a b' b m) => Alternative (WriterP w p a' a b' b m) Source # | |
MonadPlus (p a' a b' b m) => MonadPlus (WriterP w p a' a b' b m) Source # | |
runWriterP :: Monoid w => WriterP w p a' a b' b m r -> p a' a b' b m (r, w) Source #
Run a WriterP
computation, producing the final result and monoid
runWriterK :: Monoid w => (q -> WriterP w p a' a b' b m r) -> q -> p a' a b' b m (r, w) Source #
Run a WriterP
'K
'leisli arrow, producing the final result and monoid
execWriterP :: (Monad (p a' a b' b m), Monoid w) => WriterP w p a' a b' b m r -> p a' a b' b m w Source #
Evaluate a WriterP
computation, but discard the final result
execWriterK :: (Monad (p a' a b' b m), Monoid w) => (q -> WriterP w p a' a b' b m r) -> q -> p a' a b' b m w Source #
Evaluate a WriterP
'K
'leisli arrow, but discard the final result