profunctors-4.0.2: Profunctors

PortabilityRank2Types
Stabilityprovisional
MaintainerEdward Kmett <ekmett@gmail.com>
Safe HaskellTrustworthy

Data.Profunctor.Rift

Description

 

Synopsis

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