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 :: (Proxy p, Monad m, Monoid w) => WriterP w p a' a b' b m r -> p a' a b' b m w
- execWriterK :: (Proxy p, Monad m, Monoid w) => (q -> WriterP w p a' a b' b m r) -> q -> p a' a b' b m w
- tell :: (Proxy p, Monad m, Monoid w) => w -> WriterP w p a' a b' b m ()
- censor :: (Proxy p, Monad 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
ProxyTrans (WriterP w) Source # | |
PFunctor (WriterP w) Source # | |
MonadIOP p => MonadIOP (WriterP w p) Source # | |
MonadPlusP p => MonadPlusP (WriterP w p) Source # | |
Proxy p => Proxy (WriterP w p) Source # | |
Proxy p => MonadTrans (WriterP w p a' a b' b) Source # | |
Proxy p => MFunctor (WriterP w p a' a b' b) Source # | |
(Proxy p, Monad m) => Monad (WriterP w p a' a b' b m) Source # | |
(Proxy p, Monad m) => Functor (WriterP w p a' a b' b m) Source # | |
(Proxy p, Monad m) => Applicative (WriterP w p a' a b' b m) Source # | |
(MonadIOP p, MonadIO m) => MonadIO (WriterP w p a' a b' b m) Source # | |
(MonadPlusP p, Monad m) => Alternative (WriterP w p a' a b' b m) Source # | |
(MonadPlusP p, Monad 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 :: (Proxy p, Monad 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 :: (Proxy p, Monad 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