monad-resumption-0.1.3.0: Resumption and reactive resumption monads for Haskell.

Safe HaskellSafe
LanguageHaskell2010

Control.Monad.Resumption.Connectors

Synopsis

Documentation

(<||>) :: Monad m => ReacT i1 o1 m a -> ReacT i2 o2 m a -> ReacT (i1, i2) (o1, o2) m a Source #

The parallel operator for combining computations in ReacT that share the same underlying monad and halting types. No guarantees are given to which device's halting message will be seen by a handler.

refoldT :: forall o1 o2 i1 i2 m a. Monad m => (o1 -> o2) -> (o1 -> i2 -> Maybe i1) -> ReacT i1 o1 m a -> ReacT i2 o2 m a Source #

The refoldT operator is a refold where the input-modifying function yields a type in Maybe

refold :: Monad m => (o1 -> o2) -> (o1 -> i2 -> i1) -> ReacT i1 o1 m a -> ReacT i2 o2 m a Source #

The refold operator changes the output and input types of a reactive resumption

pipeline :: Monad m => ReacT i z m a -> ReacT z o m a -> ReacT i o m a Source #

Chains two reactive resumptions together in a pipelined fashioned. That is, inputs and outputs are passed along between devices "tickwise".