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

Data.Functor.Kan.Square

Description

 
Synopsis

Documentation

data Lan j f b Source #

The left Kan extension of a functor f along a profunctor j.

The left Kan extension of a functor f along a functor g is Lan (Costar g) f.

Constructors

forall a. Lan (j a b) (f a) 

lanSquare :: Square '[j] '[] '[f] '[Lan j f] Source #

+--f--+
|  v  |
j--@  |
|  v  |
+--L--+

lanFactor :: (Profunctor h, IsFList gs) => Square '[j, h] '[] '[f] gs -> Square '[h] '[] '[Lan j f] gs Source #

+--f--+
|  v  |     +--L--+
j-\|  |     |  v  |
|  @  | ==> h--@  |
h-/|  |     |  v  |
|  v  |     +--g--+
+--g--+

Any square like the one on the left factors through lanSquare. lanFactor gives the remaining square.

newtype Ran j f a Source #

The right Kan extension of a functor f along a profunctor j.

The right Kan extension of a functor f along a functor g is Ran (Star g) f.

Constructors

Ran 

Fields

  • runRan :: forall b. j a b -> f b
     

ranSquare :: Square '[j] '[] '[Ran j g] '[g] Source #

+--R--+
|  v  |
j--@  |
|  v  |
+--g--+

ranFactor :: (Profunctor j, IsFList fs) => Square '[h, j] '[] fs '[g] -> Square '[h] '[] fs '[Ran j g] Source #

+--f--+
|  v  |     +--f--+
h-\|  |     |  v  |
|  @  | ==> h--@  |
j-/|  |     |  v  |
|  v  |     +--R--+
+--g--+

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