Copyright | 2008-2010 Edward Kmett |
---|---|

License | BSD |

Maintainer | Edward Kmett <ekmett@gmail.com> |

Stability | experimental |

Portability | non-portable (class-associated types) |

Safe Haskell | Trustworthy |

Language | Haskell2010 |

- class (Symmetric k (Product k), Monoidal k (Product k)) => Cartesian k where
- bimapProduct :: Cartesian k => k a c -> k b d -> Product k a b `k` Product k c d
- braidProduct :: Cartesian k => k (Product k a b) (Product k b a)
- associateProduct :: Cartesian k => Product k (Product k a b) c `k` Product k a (Product k b c)
- disassociateProduct :: Cartesian k => Product k a (Product k b c) `k` Product k (Product k a b) c
- class (Monoidal k (Sum k), Symmetric k (Sum k)) => CoCartesian k where
- bimapSum :: CoCartesian k => k a c -> k b d -> Sum k a b `k` Sum k c d
- braidSum :: CoCartesian k => Sum k a b `k` Sum k b a
- associateSum :: CoCartesian k => Sum k (Sum k a b) c `k` Sum k a (Sum k b c)
- disassociateSum :: CoCartesian k => Sum k a (Sum k b c) `k` Sum k (Sum k a b) c

# (Co)Cartesian categories

class (Symmetric k (Product k), Monoidal k (Product k)) => Cartesian k where Source

Minimum definition:

fst, snd, diag fst, snd, (&&&)

fst :: Product k a b `k` a Source

snd :: Product k a b `k` b Source

diag :: a `k` Product k a a Source

(&&&) :: (a `k` b) -> (a `k` c) -> a `k` Product k b c infixr 3 Source

Cartesian (->) |

bimapProduct :: Cartesian k => k a c -> k b d -> Product k a b `k` Product k c d Source

braidProduct :: Cartesian k => k (Product k a b) (Product k b a) Source

associateProduct :: Cartesian k => Product k (Product k a b) c `k` Product k a (Product k b c) Source

free construction of `Associative`

for the product `Bifunctor`

`Product k`

disassociateProduct :: Cartesian k => Product k a (Product k b c) `k` Product k (Product k a b) c Source

free construction of `Disassociative`

for the product `Bifunctor`

`Product k`

class (Monoidal k (Sum k), Symmetric k (Sum k)) => CoCartesian k where Source

CoCartesian (->) |

bimapSum :: CoCartesian k => k a c -> k b d -> Sum k a b `k` Sum k c d Source

braidSum :: CoCartesian k => Sum k a b `k` Sum k b a Source

associateSum :: CoCartesian k => Sum k (Sum k a b) c `k` Sum k a (Sum k b c) Source

free construction of `Associative`

for the coproduct `Bifunctor`

`Sum k`

disassociateSum :: CoCartesian k => Sum k a (Sum k b c) `k` Sum k (Sum k a b) c Source

free construction of `Disassociative`

for the coproduct `Bifunctor`

`Sum k`