Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Handling monad morphisms.
Synopsis
- hoistCellOutput :: (Monad m1, Monad m2) => (forall s. m1 (b1, s) -> m2 (b2, s)) -> Cell m1 a b1 -> Cell m2 a b2
- hoistCellKleisli_ :: (Monad m1, Monad m2) => (forall s. (a1 -> m1 (b1, s)) -> a2 -> m2 (b2, s)) -> Cell m1 a1 b1 -> Cell m2 a2 b2
- 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
- hoistCellKleisliStateChange :: (Monad m1, Monad m2, Typeable t, 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
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, Typeable t, 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.