Safe Haskell | None |
---|---|
Language | Haskell2010 |
Effect
data Writer w :: Effect where Source #
An effect capable of accumulating outputs. This roughly corresponds to the MonadWriter
typeclass and WriterT
monad transformer in the mtl
approach.
However, note that this does not have a pass
operation as we are not sure what its semantics should be. In fact,
the pass
semantics in mtl
is also unclear and will change when handlers are put in different orders. To avoid
any confusion we decided it is best that we don't include it because no one seems to be relying on it anyway.
Operations
listens :: Writer w :> es => (w -> x) -> Eff es a -> Eff es (a, x) Source #
Apply a function to the accumulated output of listen
.