invertible-0.2.0.8: 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 Control.Invertible.MonadArrow-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 Control.Invertible.MonadArrow-form bijection. (Equivalent to bifmap and biarr.)