Proposal: Add Compositor class as superclass of Arrow

Ashley Yakeley ashley at
Sun Oct 21 05:05:20 EDT 2007


So far it looks like:

1. The class should be named "Category" rather than "Compositor".

2. The members should either be

   identity :: cat a a
   (<<<) :: cat b c -> cat a b -> cat a c


   id :: cat a a
   (.) :: cat b c -> cat a b -> cat a c

Since a preference has been expressed, I'll go with id and (.) unless 
there are objections. These will not replace the specialised id and (.) 
in the Prelude.

3. There might be another useful class that's a subclass of Category and 
a superclass of Arrow, that essentially includes first but not arr. If 
someone wants to name it and define it, we can put it in the class 

4. Redefining Functor, Applicative, and Monad to have two type arguments 
is out of scope of this proposal.

Ashley Yakeley

More information about the Libraries mailing list