Proposal: Add Compositor class as superclass of Arrow

Conal Elliott conal at conal.net
Mon Oct 22 17:42:40 EDT 2007


i'm missing a piece of reasoning.  how about having &&& as primitive as in
your Cartesian proposal, but without the fst/&&& and snd/&&& laws?  you
could still introduce those laws in a subclass that does not include Arrow.

  - Conal

On 10/22/07, apfelmus <apfelmus at quantentunnel.de> wrote:
>
> Conal Elliott wrote:
> > I like the simplicity of th Cartesian class, including definability of
> dup,
> > swap, lAssoc, rAssoc, first, and second.
> >
> > I'm missing the significance of
> >
> >> But IIRC, (&&&) does impose an "order of side effects" on the
> arguments,
> > so Arrows are more general (less restrictive) than cartesian categories.
> >
> > Is it just that you're wondering with what class to associate the
> fst/&&&
> > and snd/&&& laws?
> >
> >     fst . (f &&& g) = f
> >     snd . (f &&& g) = g
>
> Exactly. They often don't hold for Arrows but are taken granted for
> Cartesian categories. So, using (&&&) as primitive is - despite its
> elegance - not the right thing to do. (That's also why Arrows have first
> and second as primitives even when (&&&) makes them superfluous.).
>
> Regards,
> apfelmus
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/libraries/attachments/20071022/745909b6/attachment-0001.htm


More information about the Libraries mailing list