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.Distributive.Square

Description

 
Synopsis

Documentation

cotraverse :: (Distributive t, Functor f) => Square '[Costar f] '[Costar f] '[t] '[t] Source #

+--t--+
|  v  |
f<-@-<f
|  v  |
+--t--+
cotraverse = (funId ||| fromRight) === distribute === (toLeft ||| funId)

distribute :: (Distributive t, Functor f) => Square '[] '[] '[t, f] '[f, t] Source #

+---t-f-+
|   v v |
| /-@-/ |
| v v   |
+-f-t---+
distribute = fromRight ||| cotraverse ||| toLeft