invertible-0.1.2: bidirectional arrows, bijective functions, and invariant functors

Safe HaskellSafe
LanguageHaskell2010

Data.Invertible.Monad

Description

Using bijections with monads.

Synopsis

Documentation

bind :: Monad m => (a -> m b) -> (b -> m a) -> m a <-> m b Source #

Bind two functions to create a BiKleisli-form bijection.

(=<<->>=) :: Monad m => (a -> m b) -> (b -> m a) -> m a <-> m b infix 2 Source #

Crazy operator form of bind.

liftM :: Monad m => (a <-> b) -> m a <-> m b Source #

Promote a bijection to a BiKleisli-form bijection. (Equivalent to bifmap.)