profunctors-4.0.1: Profunctors

Portability | Rank2Types
Stability | provisional
Maintainer | Edward Kmett <ekmett@gmail.com>
Safe Haskell | Trustworthy

Data.Profunctor.Rift

Description

Synopsis

- 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

newtype Rift p q a b Source

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.

Constructors

Rift |

Fields

runRift :: forall x. p x a -> q x b

Instances

~ (* -> * -> *) p q => Category (Rift p q) | ``Rift` p p` forms a `Monad` in the `Profunctor` 2-category, which is isomorphic to a Haskell `Category` instance.
(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 ``Rift` f (->)` then `decomposeRift` is the `counit` of the adjunction.

precomposeRift :: Profunctor q => Procompose (Rift p (->)) q a b -> Rift p q a bSource