essence-of-live-coding-0.2.5: General purpose live coding framework
Safe HaskellSafe-Inferred
LanguageHaskell2010

LiveCoding.Cell.Monad

Description

Handling monad morphisms.

Synopsis

Documentation

hoistCellOutput :: (Monad m1, Monad m2) => (forall s. m1 (b1, s) -> m2 (b2, s)) -> Cell m1 a b1 -> Cell m2 a b2 Source #

Apply a monad morphism that also transforms the output to a cell.

hoistCellKleisli_ :: (Monad m1, Monad m2) => (forall s. (a1 -> m1 (b1, s)) -> a2 -> m2 (b2, s)) -> Cell m1 a1 b1 -> Cell m2 a2 b2 Source #

Apply a transformation of Kleisli morphisms to a cell.

hoistCellKleisli :: (Monad m1, Monad m2) => (forall s. (s -> a1 -> m1 (b1, s)) -> s -> a2 -> m2 (b2, s)) -> Cell m1 a1 b1 -> Cell m2 a2 b2 Source #

Apply a transformation of stateful Kleisli morphisms to a cell.

hoistCellKleisliStateChange :: (Monad m1, Monad m2, forall s. Data s => Data (t s)) => (forall s. (s -> a1 -> m1 (b1, s)) -> t s -> a2 -> m2 (b2, t s)) -> (forall s. s -> t s) -> Cell m1 a1 b1 -> Cell m2 a2 b2 Source #

Apply a transformation of stateful Kleisli morphisms to a cell, changing the state type.