|Portability||non-portable (class-associated types)|
|Maintainer||Edward Kmett <firstname.lastname@example.org>|
- module Control.Category.Associative
- module Control.Category.Monoidal
- class (Associative k p, Coassociative k p, Braided k p) => PreCartesian k p | k -> p where
- bimapPreCartesian :: PreCartesian k p => k a c -> k b d -> k (p a b) (p c d)
- braidPreCartesian :: PreCartesian k p => k (p a b) (p b a)
- associatePreCartesian :: PreCartesian k p => k (p (p a b) c) (p a (p b c))
- coassociatePreCartesian :: PreCartesian k p => k (p a (p b c)) (p (p a b) c)
- class (Associative k s, Coassociative k s, Braided k s) => PreCoCartesian k s | k -> s where
- bimapPreCoCartesian :: PreCoCartesian k s => k a c -> k b d -> k (s a b) (s c d)
- braidPreCoCartesian :: PreCoCartesian k s => k (s a b) (s b a)
- associatePreCoCartesian :: PreCoCartesian k s => k (s (s a b) c) (s a (s b c))
- coassociatePreCoCartesian :: PreCoCartesian k s => k (s a (s b c)) (s (s a b) c)
- class (Monoidal k p i, PreCartesian k p) => Cartesian k p i | k -> p i
- class (Comonoidal k s i, PreCoCartesian k s) => CoCartesian k s i | k -> s i
NB: This is weaker than traditional category with products! That is Cartesian, below.
The problem is
(->) lacks an initial object, since every type is inhabited in Haskell.
Consequently its coproduct is merely a semigroup, not a monoid as it has no identity, and
since we want to be able to describe its dual category, which has this non-traditional
form being built over a category with an associative bifunctor rather than as a monoidal category
for the product monoid.
fst, snd, diag fst, snd, (&&&)