ANNOUNCE: yap-0.0 - yet another prelude
kahl at cas.mcmaster.ca
Mon Aug 15 05:55:56 CEST 2011
On Mon, Aug 15, 2011 at 10:00:03AM +0900, Sebastian Fischer wrote:
> > I see your versions of + and * are infixr rather than infixl.
> >> Is that important?
> > I copied fixities from the Prelude  for + and * but don't know why they
> > are infixl there.
> Sorry, I just saw that I confused infixl and infixr in your question. In
> fact, in my two Semiring modules I use different fixities. infixr in the
> regexp library and infixl (copied from Prelude) in the (not yet published)
> library for parallel programming. So apparently, I don't care very much ;)
> Are there good arguments in favor of or against either choice?
In the presence of - at the same precedence as + you want both to be infixl,
a + b - c + d - e - f = ((((a + b) - c) + d) - e) - f
The same for * with /.
More information about the Libraries