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

Stability | experimental |

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

Safe Haskell | Trustworthy |

- 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 whereSource

Minimum definition:

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

fst :: Product k a b `k` aSource

snd :: Product k a b `k` bSource

diag :: a `k` Product k a aSource

(&&&) :: (a `k` b) -> (a `k` c) -> a `k` Product k b cSource

Cartesian (->) |

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

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) cSource

free construction of `Disassociative`

for the product `Bifunctor`

`Product k`

class (Monoidal k (Sum k), Symmetric k (Sum k)) => CoCartesian k whereSource

CoCartesian (->) |

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

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

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) cSource

free construction of `Disassociative`

for the coproduct `Bifunctor`

`Sum k`