Portability | Rank2Types |
---|---|
Stability | provisional |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Safe Haskell | Trustworthy |
- newtype Rift p q a b = Rift {
- runRift :: forall x. p x a -> q x b
- decomposeRift :: Procompose q (Rift q p) a b -> p a b
- precomposeRift :: Profunctor q => Procompose (Rift p (->)) q a b -> Rift p q a b
Documentation
This represents the right Kan lift of a Profunctor
q
along a Profunctor
p
in a limited version of the 2-category of Profunctors where the only object is the category Hask, 1-morphisms are profunctors composed and compose with Profunctor composition, and 2-morphisms are just natural transformations.
~ (* -> * -> *) p q => Category (Rift p q) |
|
(Profunctor p, Profunctor q) => Profunctor (Rift p q) | |
Profunctor q => Functor (Rift p q a) |
decomposeRift :: Procompose q (Rift q p) a b -> p a bSource
The 2-morphism that defines a right Kan lift.
Note: When f
is left adjoint to
then Rift
f (->)decomposeRift
is the counit
of the adjunction.
precomposeRift :: Profunctor q => Procompose (Rift p (->)) q a b -> Rift p q a bSource