squares-0.1: The double category of Hask functors and profunctors

LicenseBSD-style (see the file LICENSE)
Maintainersjoerd@w3future.com
Safe HaskellSafe
LanguageHaskell2010

Data.Profunctor.Square

Contents

Description

 
Synopsis

Squares for profunctor subclasses

second :: Strong p => Square '[p] '[p] '[(,) a] '[(,) a] Source #

+-a⊗_-+
|  v  |
p--@--p
|  v  |
+-a⊗_-+

right :: Choice p => Square '[p] '[p] '[Either a] '[Either a] Source #

+-a⊕_-+
|  v  |
p--@--p
|  v  |
+-a⊕_-+

closed :: Closed p => Square '[p] '[p] '[(->) a] '[(->) a] Source #

+-a→_-+
|  v  |
p--@--p
|  v  |
+-a→_-+

map :: (Mapping p, Functor f) => Square '[p] '[p] '[f] '[f] Source #

+--f--+
|  v  |
p--@--p
|  v  |
+--f--+

Squares for (->)

fromHom :: Square '[(->)] '[] '[] '[] Source #

 +-----+
 |     |
(→)-@  |
 |     |
 +-----+

toHom :: Square '[] '[(->)] '[] '[] Source #

+-----+
|     |
|  @-(→)
|     |
+-----+

Squares for Procompose

fromProcompose :: (Profunctor p, Profunctor q) => Square '[Procompose q p] '[p, q] '[] '[] Source #

 +-----+
 |   /-p
q.p-@  |
 |   \-q
 +-----+

toProcompose :: (Profunctor p, Profunctor q) => Square '[p, q] '[Procompose q p] '[] '[] Source #

 +-----+
 p-\   |
 |  @-q.p
 q-/   |
 +-----+