Kleislify-0.0.4: Variants of Control.Arrow functions, specialised to kleislis.

Portabilityportable
Stabilityexperimental
Maintainerdylan@techtangents.com
Safe HaskellSafe-Infered

Control.Kleislify

Description

Precomposition and postcomposition of functors and monads.

Variants of Control.Arrow functions, specialised to kleislis. Avoids boxing into Kleisli values.

Synopsis

Documentation

(^=>) :: Monad m => (b -> c) -> (c -> m d) -> b -> m dSource

precomposition of a monad with a pure function. Equivalent to ^>> Equivalent to 'flip (.)'

(^->) :: Functor f => (b -> c) -> (c -> f d) -> b -> f dSource

precomposition of a functor with a pure function. Equivalent to 'flip (.)'

(=>^) :: Monad m => (b -> m c) -> (c -> d) -> b -> m dSource

postcomposition of a monad with a pure function. Equivalent to >>^

(->^) :: Functor f => (b -> f c) -> (c -> d) -> b -> f dSource

postcomposition of a functor with a pure function. Equivalent to >>^

(<=^) :: Monad m => (c -> m d) -> (b -> c) -> b -> m dSource

precomposition of a monad with a pure function (right-to-left variant). Equivalent to <<^ Equivalent to .

(<-^) :: Functor f => (c -> f d) -> (b -> c) -> b -> f dSource

precomposition of a functor with a pure function (right-to-left variant). Equivalent to <<^ Equivalent to .

(^<=) :: Monad m => (c -> d) -> (b -> m c) -> b -> m dSource

postcomposition of a monad with a pure function (right-to-left variant). Equivalent to ^<<

(^<-) :: Functor f => (c -> d) -> (b -> f c) -> b -> f dSource

postcomposition of a functor with a pure function (right-to-left variant). Equivalent to ^<<