Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
MSFs with a Writer monadic layer.
This module contains functions to work with MSFs that include a Writer
monadic layer. This includes functions to create new MSFs that include an
additional layer, and functions to flatten that layer out of the MSF's
transformer stack.
- module Control.Monad.Trans.Writer.Strict
- writerS :: (Monad m, Monoid s) => MSF m a (s, b) -> MSF (WriterT s m) a b
- runWriterS :: Monad m => MSF (WriterT s m) a b -> MSF m a (s, b)
- writerS' :: (Monad m, Monoid s) => MSF m a (s, b) -> MSF (WriterT s m) a b
- runWriterS' :: (Monoid s, Functor m, Monad m) => MSF (WriterT s m) a b -> MSF m a (s, b)
- writerS'' :: (Monad m, Monoid w) => MSF m a (w, b) -> MSF (WriterT w m) a b
- runWriterS'' :: (Monoid s, Functor m, Monad m) => MSF (WriterT s m) a b -> MSF m a (s, b)
Documentation
Writer MSF running / wrapping / unwrapping
writerS :: (Monad m, Monoid s) => MSF m a (s, b) -> MSF (WriterT s m) a b Source #
Build an MSF in the Writer
monad from one that produces the log as an
extra output. This is the opposite of runWriterS
.
Alternative implementation using lifterS
runWriterS' :: (Monoid s, Functor m, Monad m) => MSF (WriterT s m) a b -> MSF m a (s, b) Source #
Alternative implementation of runWriterS
using lifterS
.