dunai-0.3.0.0: Generalised reactive framework supporting classic, arrowized and monadic FRP.

Safe HaskellSafe
LanguageHaskell2010

Control.Monad.Trans.MSF.Writer

Contents

Description

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.

Synopsis

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.

runWriterS :: Monad m => MSF (WriterT s m) a b -> MSF m a (s, b) Source #

Build an MSF that produces the log as an extra output from one on the Writer monad. This is the opposite of writerS.

Alternative implementation using lifterS

writerS' :: (Monad m, Monoid s) => MSF m a (s, b) -> MSF (WriterT s m) a b Source #

Alternative implementation of writerS 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.

Alternative implementation using transS

writerS'' :: (Monad m, Monoid w) => MSF m a (w, b) -> MSF (WriterT w m) a b Source #

Alternative implementation of writerS using transS.

runWriterS'' :: (Monoid s, Functor m, Monad m) => MSF (WriterT s m) a b -> MSF m a (s, b) Source #

Alternative implementation of runWriterS using transS.