invertible-0.2.0.8: bidirectional arrows, bijective functions, and invariant functors
Safe HaskellSafe-Inferred
LanguageHaskell2010

Control.Invertible.MonadArrow

Description

A symmetric version of the Kleisli monad transformer arrow. This admits three isomorphic MonadBijection types:

The Alimarine paper just calls it "MoT" for Monad Transformer.

Synopsis

Documentation

newtype MonadArrow a m b c Source #

Bidirectional Kleisli-like monad arrow transformer.

Constructors

MonadArrow 

Fields

Instances

Instances details
Category a => Category (MonadArrow a m :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Invertible.MonadArrow

Methods

id :: forall (a0 :: k). MonadArrow a m a0 a0 #

(.) :: forall (b :: k) (c :: k) (a0 :: k). MonadArrow a m b c -> MonadArrow a m a0 b -> MonadArrow a m a0 c #

Groupoid a => Groupoid (MonadArrow a m :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Invertible.MonadArrow

Methods

inv :: forall (a0 :: k) (b :: k). MonadArrow a m a0 b -> MonadArrow a m b a0 Source #

Semigroupoid a => Semigroupoid (MonadArrow a m :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Invertible.MonadArrow

Methods

o :: forall (j :: k) (k1 :: k) (i :: k). MonadArrow a m j k1 -> MonadArrow a m i j -> MonadArrow a m i k1 Source #

Monad m => Arrow (MonadArrow (<->) m) Source # 
Instance details

Defined in Control.Invertible.MonadArrow

Methods

arr :: (b -> c) -> MonadArrow (<->) m b c #

first :: MonadArrow (<->) m b c -> MonadArrow (<->) m (b, d) (c, d) #

second :: MonadArrow (<->) m b c -> MonadArrow (<->) m (d, b) (d, c) #

(***) :: MonadArrow (<->) m b c -> MonadArrow (<->) m b' c' -> MonadArrow (<->) m (b, b') (c, c') #

(&&&) :: MonadArrow (<->) m b c -> MonadArrow (<->) m b c' -> MonadArrow (<->) m b (c, c') #

Monad m => Arrow (MonadArrow (->) m) Source # 
Instance details

Defined in Control.Invertible.MonadArrow

Methods

arr :: (b -> c) -> MonadArrow (->) m b c #

first :: MonadArrow (->) m b c -> MonadArrow (->) m (b, d) (c, d) #

second :: MonadArrow (->) m b c -> MonadArrow (->) m (d, b) (d, c) #

(***) :: MonadArrow (->) m b c -> MonadArrow (->) m b' c' -> MonadArrow (->) m (b, b') (c, c') #

(&&&) :: MonadArrow (->) m b c -> MonadArrow (->) m b c' -> MonadArrow (->) m b (c, c') #

Monad m => ArrowChoice (MonadArrow (<->) m) Source # 
Instance details

Defined in Control.Invertible.MonadArrow

Methods

left :: MonadArrow (<->) m b c -> MonadArrow (<->) m (Either b d) (Either c d) #

right :: MonadArrow (<->) m b c -> MonadArrow (<->) m (Either d b) (Either d c) #

(+++) :: MonadArrow (<->) m b c -> MonadArrow (<->) m b' c' -> MonadArrow (<->) m (Either b b') (Either c c') #

(|||) :: MonadArrow (<->) m b d -> MonadArrow (<->) m c d -> MonadArrow (<->) m (Either b c) d #

Monad m => ArrowChoice (MonadArrow (->) m) Source # 
Instance details

Defined in Control.Invertible.MonadArrow

Methods

left :: MonadArrow (->) m b c -> MonadArrow (->) m (Either b d) (Either c d) #

right :: MonadArrow (->) m b c -> MonadArrow (->) m (Either d b) (Either d c) #

(+++) :: MonadArrow (->) m b c -> MonadArrow (->) m b' c' -> MonadArrow (->) m (Either b b') (Either c c') #

(|||) :: MonadArrow (->) m b d -> MonadArrow (->) m c d -> MonadArrow (->) m (Either b c) d #

MonadPlus m => ArrowPlus (MonadArrow (<->) m) Source # 
Instance details

Defined in Control.Invertible.MonadArrow

Methods

(<+>) :: MonadArrow (<->) m b c -> MonadArrow (<->) m b c -> MonadArrow (<->) m b c #

MonadPlus m => ArrowPlus (MonadArrow (->) m) Source # 
Instance details

Defined in Control.Invertible.MonadArrow

Methods

(<+>) :: MonadArrow (->) m b c -> MonadArrow (->) m b c -> MonadArrow (->) m b c #

MonadPlus m => ArrowZero (MonadArrow (<->) m) Source # 
Instance details

Defined in Control.Invertible.MonadArrow

Methods

zeroArrow :: MonadArrow (<->) m b c #

MonadPlus m => ArrowZero (MonadArrow (->) m) Source # 
Instance details

Defined in Control.Invertible.MonadArrow

Methods

zeroArrow :: MonadArrow (->) m b c #

(BiArrow a, Monad m) => BiArrow (MonadArrow a m) Source # 
Instance details

Defined in Control.Invertible.MonadArrow

Methods

(<->) :: (b -> c) -> (c -> b) -> MonadArrow a m b c Source #

invert :: MonadArrow a m b c -> MonadArrow a m c b Source #

Monad m => BiArrow' (MonadArrow (<->) m) Source # 
Instance details

Defined in Control.Invertible.MonadArrow

type MonadFunction = MonadArrow (->) Source #

Specialization of MonadArrow to function arrows.

type MonadBijection'' m a b = m a <-> m b Source #

monadBijection :: MonadBijection' m a b <-> MonadBijection m a b Source #

Convert between isomorphic representations of MonadBijections.

monadBijection' :: MonadBijection'' m a b <-> MonadBijection' m a b Source #

Convert between isomorphic representations of MonadBijections.