Safe Haskell | None |
---|---|
Language | Haskell2010 |
A high-performance, strict, church-encoded carrier for Writer
.
This carrier issues left-associated mappend
s, meaning that Monoid
s such as []
with poor performance for left-associated mappend
s are ill-suited for use with this carrier. Alternatives such as Endo
, Seq
, or DList
may be preferred.
Since: 1.1.0.0
Synopsis
- runWriter :: Monoid w => (w -> a -> m b) -> WriterC w m a -> m b
- execWriter :: (Monoid w, Applicative m) => WriterC w m a -> m w
- newtype WriterC w (m :: Type -> Type) a = WriterC (StateC w m a)
- module Control.Effect.Writer
Writer carrier
execWriter :: (Monoid w, Applicative m) => WriterC w m a -> m w Source #
newtype WriterC w (m :: Type -> Type) a Source #
Since: 1.1.0.0
Instances
MonadTrans (WriterC w) Source # | |
Defined in Control.Carrier.Writer.Church | |
MonadIO m => MonadIO (WriterC w m) Source # | |
Defined in Control.Carrier.Writer.Church | |
Alternative m => Alternative (WriterC w m) Source # | |
Applicative (WriterC w m) Source # | |
Defined in Control.Carrier.Writer.Church | |
Functor (WriterC w m) Source # | |
Monad (WriterC w m) Source # | |
(Alternative m, Monad m) => MonadPlus (WriterC w m) Source # | |
MonadFail m => MonadFail (WriterC w m) Source # | |
Defined in Control.Carrier.Writer.Church | |
MonadFix m => MonadFix (WriterC w m) Source # | |
Defined in Control.Carrier.Writer.Church | |
(Algebra sig m, Monoid w) => Algebra (Writer w :+: sig) (WriterC w m) Source # | |
Writer effect
module Control.Effect.Writer