Safe Haskell | None |
---|---|
Language | Haskell2010 |
A carrier for Writer
effects. This carrier performs its append operations strictly and thus avoids the space leaks inherent in lazy writer monads. These appends are left-associative; as such, []
is a poor choice of monoid for computations that entail many calls to tell
. The Seq or DList monoids may be a superior choice.
This implementation is based on a post Gabriel Gonzalez made to the Haskell mailing list: https://mail.haskell.org/pipermail/libraries/2013-March/019528.html
Since: 1.0.0.0
Writer carrier
newtype WriterC w m a Source #
A space-efficient carrier for Writer
effects, implemented atop Control.Carrier.State.Strict.
Since: 1.0.0.0
Instances
MonadTrans (WriterC w) Source # | |
Defined in Control.Carrier.Writer.Strict | |
Monad m => Monad (WriterC w m) Source # | |
Functor m => Functor (WriterC w m) Source # | |
MonadFix m => MonadFix (WriterC w m) Source # | |
Defined in Control.Carrier.Writer.Strict | |
MonadFail m => MonadFail (WriterC w m) Source # | |
Defined in Control.Carrier.Writer.Strict | |
Monad m => Applicative (WriterC w m) Source # | |
Defined in Control.Carrier.Writer.Strict | |
MonadIO m => MonadIO (WriterC w m) Source # | |
Defined in Control.Carrier.Writer.Strict | |
(Alternative m, Monad m) => Alternative (WriterC w m) Source # | |
(Alternative m, Monad m) => MonadPlus (WriterC w m) Source # | |
(Monoid w, Algebra sig m, Effect sig) => Algebra (Writer w :+: sig) (WriterC w m) Source # | |
Writer effect
module Control.Effect.Writer