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@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@haskell.org http://www.haskell.org/mailman/listinfo/libraries