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

Safe HaskellSafe
LanguageHaskell2010

Control.Monad.Trans.MSF.GenLift

Contents

Synopsis

Attempt at writing a more generic MSF lifting combinator. This is

lifterS :: (Monad m, Monad m1) => ((a1 -> m1 (b1, MSF m1 a1 b1)) -> a -> m (b, MSF m1 a1 b1)) -> MSF m1 a1 b1 -> MSF m a b Source #

Another wrapper idea

transS :: (Monad m1, Monad m2) => (a2 -> m1 a1) -> (forall c. a2 -> m1 (b1, c) -> m2 (b2, c)) -> MSF m1 a1 b1 -> MSF m2 a2 b2 Source #

A more general lifting mechanism that enables recovery.

transG1 :: (Monad m1, Functor m2, Monad m2) => (a2 -> m1 a1) -> (forall c. a2 -> m1 (b1, c) -> m2 (b2, c)) -> MSF m1 a1 b1 -> MSF m2 a2 b2 Source #

transG :: (Monad m1, Monad m2) => (a2 -> m1 a1) -> (forall c. a2 -> m1 (b1, c) -> m2 (b2, Maybe c)) -> MSF m1 a1 b1 -> MSF m2 a2 b2 Source #

Wrapping/unwrapping

type Wrapper m1 m2 t1 t2 = forall a b. (t1 a -> m2 b) -> a -> m1 (t2 b) Source #

type Unwrapper m1 m2 t1 t2 = forall a b. (a -> m1 (t2 b)) -> t1 a -> m2 b Source #

type Id a = a Source #