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

Safe HaskellSafe
LanguageHaskell2010

Control.Monad.Trans.MSF.Reader

Contents

Description

MSFs with a Reader monadic layer.

This module contains functions to work with MSFs that include a Reader 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

Reader MSF wrapping/unwrapping.

readerS :: Monad m => MSF m (s, a) b -> MSF (ReaderT s m) a b Source #

Build an MSF in the Reader monad from one that takes the reader environment as an extra input. This is the opposite of runReaderS.

runReaderS :: Monad m => MSF (ReaderT s m) a b -> MSF m (s, a) b Source #

Build an MSF that takes an environment as an extra input from one on the Reader monad. This is the opposite of readerS.

runReaderS_ :: Monad m => MSF (ReaderT s m) a b -> s -> MSF m a b Source #

Build an MSF function that takes a fixed environment as additional input, from an MSF in the Reader monad.

This should be always equal to:

runReaderS_ msf s = arr (a -> (s,a)) >>> runReaderS msf

although possibly more efficient.

Alternative implementation using internal type.

readerS' :: Monad m => MSF m (s, a) b -> MSF (ReaderT s m) a b Source #

Alternative version of readerS.

runReaderS' :: Monad m => MSF (ReaderT s m) a b -> MSF m (s, a) b Source #

Alternative version of runReaderS wrapping/unwrapping functions.

Alternative implementation using generic lifting.

runReaderS'' :: Monad m => MSF (ReaderT s m) a b -> MSF m (s, a) b Source #

Alternative version of runReaderS.