squares-0.2.1: The double category of Hask functors and profunctors
LicenseBSD-style (see the file LICENSE)
Maintainersjoerd@w3future.com
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Profunctor.Kan.Square

Description

 
Synopsis

Documentation

newtype Ran j p a b Source #

The right Kan extension of a profunctor p along a profunctor j.

Constructors

Ran 

Fields

  • runRan :: forall c. j c a -> p c b
     

Instances

Instances details
(Profunctor j, Profunctor p) => Profunctor (Ran j p) Source # 
Instance details

Defined in Data.Profunctor.Kan.Square

Methods

dimap :: (a -> b) -> (c -> d) -> Ran j p b c -> Ran j p a d #

lmap :: (a -> b) -> Ran j p b c -> Ran j p a c #

rmap :: (b -> c) -> Ran j p a b -> Ran j p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Ran j p a b -> Ran j p a c #

(.#) :: forall a b c q. Coercible b a => Ran j p b c -> q a b -> Ran j p a c #

Profunctor p => Functor (Ran j p a) Source # 
Instance details

Defined in Data.Profunctor.Kan.Square

Methods

fmap :: (a0 -> b) -> Ran j p a a0 -> Ran j p a b #

(<$) :: a0 -> Ran j p a b -> Ran j p a a0 #

ranSquare :: (Profunctor j, Profunctor p) => Square '[j, Ran j p] '[p] '[] '[] Source #

+-----+
j-\   |
|  @--p
R-/   |
+-----+

ranFactor :: (Profunctor j, Profunctor p, Profunctor q) => Square '[j, q] '[p] '[] '[] -> Square '[q] '[Ran j p] '[] '[] Source #

+-----+     +-----+
j-\   |     |     |
|  @--p ==> q--@--R
q-/   |     |     |
+-----+     +-----+

Any square like the one on the left factors through ranSquare. ranFactor gives the remaining square.

riftSquare :: (Profunctor j, Profunctor p) => Square '[Rift j p, j] '[p] '[] '[] Source #

+-----+
R-\   |
|  @--p
j-/   |
+-----+

riftFactor :: (Profunctor j, Profunctor p, Profunctor q) => Square '[q, j] '[p] '[] '[] -> Square '[q] '[Rift j p] '[] '[] Source #

+-----+     +-----+
q-\   |     |     |
|  @--p ==> q--@--R
j-/   |     |     |
+-----+     +-----+

Any square like the one on the left factors through riftSquare. riftFactor gives the remaining square.