Portability | rank 2 types |
---|---|

Stability | experimental |

Maintainer | Edward Kmett <ekmett@gmail.com> |

Safe Haskell | Trustworthy |

- newtype Ran g h a = Ran {
- runRan :: forall b. (a -> g b) -> h b

- toRan :: Functor k => (forall a. k (g a) -> h a) -> k b -> Ran g h b
- fromRan :: (forall a. k a -> Ran g h a) -> k (g b) -> h b
- composeRan :: Composition compose => Ran f (Ran g h) a -> Ran (compose f g) h a
- decomposeRan :: (Composition compose, Functor f) => Ran (compose f g) h a -> Ran f (Ran g h) a
- adjointToRan :: Adjunction f g => f a -> Ran g Identity a
- ranToAdjoint :: Adjunction f g => Ran g Identity a -> f a
- ranToComposedAdjoint :: Adjunction f g => Ran g h a -> h (f a)
- composedAdjointToRan :: (Adjunction f g, Functor h) => h (f a) -> Ran g h a
- data Lan g h a where
- toLan :: Functor f => (forall a. h a -> f (g a)) -> Lan g h b -> f b
- fromLan :: (forall a. Lan g h a -> f a) -> h b -> f (g b)
- adjointToLan :: Adjunction f g => g a -> Lan f Identity a
- lanToAdjoint :: Adjunction f g => Lan f Identity a -> g a
- lanToComposedAdjoint :: (Functor h, Adjunction f g) => Lan f h a -> h (g a)
- composedAdjointToLan :: Adjunction f g => h (g a) -> Lan f h a
- composeLan :: (Composition compose, Functor f) => Lan f (Lan g h) a -> Lan (compose f g) h a
- decomposeLan :: Composition compose => Lan (compose f g) h a -> Lan f (Lan g h) a

# Documentation

composeRan :: Composition compose => Ran f (Ran g h) a -> Ran (compose f g) h aSource

decomposeRan :: (Composition compose, Functor f) => Ran (compose f g) h a -> Ran f (Ran g h) aSource

adjointToRan :: Adjunction f g => f a -> Ran g Identity aSource

ranToAdjoint :: Adjunction f g => Ran g Identity a -> f aSource

ranToComposedAdjoint :: Adjunction f g => Ran g h a -> h (f a)Source

composedAdjointToRan :: (Adjunction f g, Functor h) => h (f a) -> Ran g h aSource

Functor (Lan f g) | |

(Functor g, Applicative h) => Applicative (Lan g h) | |

(Functor g, Apply h) => Apply (Lan g h) |

adjointToLan :: Adjunction f g => g a -> Lan f Identity aSource

lanToAdjoint :: Adjunction f g => Lan f Identity a -> g aSource

lanToComposedAdjoint :: (Functor h, Adjunction f g) => Lan f h a -> h (g a)Source

`lanToComposedAdjoint`

and `composedAdjointToLan`

witness the natural isomorphism between `Lan f h`

and `Compose h g`

given `f -| g`

composedAdjointToLan :: Adjunction f g => h (g a) -> Lan f h aSource

composeLan :: (Composition compose, Functor f) => Lan f (Lan g h) a -> Lan (compose f g) h aSource

`composeLan`

and `decomposeLan`

witness the natural isomorphism from `Lan f (Lan g h)`

and `Lan (f `

`o`

g) h

decomposeLan :: Composition compose => Lan (compose f g) h a -> Lan f (Lan g h) aSource