Proposal: Add Compositor class as superclass of Arrow
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.
On 10/22/07, apfelmus <apfelmus at quantentunnel.de> wrote:
> Conal Elliott wrote:
> > I like the simplicity of th Cartesian class, including definability of
> > swap, lAssoc, rAssoc, first, and second.
> > I'm missing the significance of
> >> But IIRC, (&&&) does impose an "order of side effects" on the
> > so Arrows are more general (less restrictive) than cartesian categories.
> > Is it just that you're wondering with what class to associate the
> > 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.).
> Libraries mailing list
> Libraries at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libraries