rhine-0.6.0: Functional Reactive Programming with type-level clocks

Safe HaskellNone
LanguageHaskell2010

FRP.Rhine.ClSF.Reader

Description

Create and remove ReaderT layers in ClSFs.

Synopsis

Documentation

commuteReaders :: ReaderT r1 (ReaderT r2 m) a -> ReaderT r2 (ReaderT r1 m) a Source #

Commute two ReaderT transformer layers past each other

readerS :: Monad m => ClSF m cl (a, r) b -> ClSF (ReaderT r m) cl a b Source #

Create ("wrap") a ReaderT layer in the monad stack of a behaviour. Each tick, the ReaderT side effect is performed by passing the original behaviour the extra r input.

runReaderS :: Monad m => ClSF (ReaderT r m) cl a b -> ClSF m cl (a, r) b Source #

Remove ("run") a ReaderT layer from the monad stack by making it an explicit input to the behaviour.

runReaderS_ :: Monad m => ClSF (ReaderT r m) cl a b -> r -> ClSF m cl a b Source #

Remove a ReaderT layer by passing the readonly environment explicitly.