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

Stability | experimental |

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

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

- toRan :: (Composition compose, Functor k) => (forall a. compose k g a -> h a) -> k b -> Ran g h b
- fromRan :: Composition compose => (forall a. k a -> Ran g h a) -> compose 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 :: (Composition compose, Adjunction f g) => Ran g h a -> compose h f a
- composedAdjointToRan :: (Composition compose, Adjunction f g, Functor h) => compose h f a -> Ran g h a
- data Lan g h a where
- toLan :: (Composition compose, Functor f) => (forall a. h a -> compose f g a) -> Lan g h b -> f b
- fromLan :: Composition compose => (forall a. Lan g h a -> f a) -> h b -> compose f g b
- adjointToLan :: Adjunction f g => g a -> Lan f Identity a
- lanToAdjoint :: Adjunction f g => Lan f Identity a -> g a
- lanToComposedAdjoint :: (Composition compose, Functor h, Adjunction f g) => Lan f h a -> compose h g a
- composedAdjointToLan :: Composition compose => Adjunction f g => compose 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

toRan :: (Composition compose, Functor k) => (forall a. compose k g a -> h a) -> k b -> Ran g h bSource

fromRan :: Composition compose => (forall a. k a -> Ran g h a) -> compose k g b -> h bSource

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 :: (Composition compose, Adjunction f g) => Ran g h a -> compose h f aSource

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

toLan :: (Composition compose, Functor f) => (forall a. h a -> compose f g a) -> Lan g h b -> f bSource

fromLan :: Composition compose => (forall a. Lan g h a -> f a) -> h b -> compose f g bSource

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

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

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

`lanToComposedAdjoint`

and `composedAdjointToLan`

witness the natural isomorphism between `Lan f h`

and `Compose h g`

given `f -| g`

composedAdjointToLan :: Composition compose => Adjunction f g => compose 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