Proposal: Add Compositor class as superclass of Arrow

Isaac Dupree isaacdupree at charter.net
Sun Oct 21 19:14:03 EDT 2007


Twan van Laarhoven wrote:
> -- | 'cat' can work with eithers
> --   Dual to CategoryPair
> class Category cat => CategoryChoice cat where
>      inl    :: cat a (Either a b)
>      inr    :: cat b (Either a b)
>      mirror :: cat (Either a b) (Either b a)
>      left   :: cat a b -> cat (Either a c) (Either b c)
>      right  :: cat a b -> cat (Either c a) (Either c b)
>      (+++)  :: cat a b -> cat c d -> cat (a,c) (b,d)

I think this was meant:
(+++)  :: cat a b -> cat c d -> cat (Either a c) (Either b d)

Isaac


More information about the Libraries mailing list