profunctors-4.2.0.1: Profunctors

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

Data.Profunctor.Ran

Description

 

Synopsis

Documentation

newtype Ran p q a b Source

This represents the right Kan extension 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

Ran 

Fields

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

Instances

Category p => ProfunctorComonad (Ran p) 
ProfunctorFunctor (Ran p) 
~ (* -> * -> *) p q => Category (Ran p q)

Ran p p forms a Monad in the Profunctor 2-category, which is isomorphic to a Haskell Category instance.

(Profunctor p, Profunctor q) => Profunctor (Ran p q) 
Profunctor q => Functor (Ran p q a) 

decomposeRan :: Procompose (Ran q p) q :-> pSource

The 2-morphism that defines a right Kan extension.

Note: When q is left adjoint to Ran q (->) then decomposeRan is the counit of the adjunction.

curryRan :: (Procompose p q :-> r) -> p :-> Ran q rSource

uncurryRan :: (p :-> Ran q r) -> Procompose p q :-> rSource