Folks,
You have all been eating too much Xmas pudding. Only one
Haskell98 Report issue has arisen since my release of 21 Dec.
The issue is this: Section 3.5 says that
(a + b +)
is a valid operator section (meaning \x -> a + b + x) because
(+) is right associative. But this is contradicted by the actual
syntax, which only has the productions:
aexp ::= '(' exp(i+1) qop(a,i) ')'
| '(' qop(a,i) exp(i+1) ')'
(Here 'a' ranges over the possible operator associativities
of left, right, non-assoc, while i ranges over precendence levels.)
This is clearly an inconsistency. I propose to fix the syntax in the
way proposed by Simon and Ian (in a thread on GHC-bugs), by
adding the following productions for aexp.
'(' lexp(i) qop(l,i) ')'
'(' qop(r,i) rexp(i) ')'
This actually follows the way that qfunlhs is defined.
There is no ambiguity, because an exp(i+1) is not an lexp(i).
This should bring the formal syntax into line with the
words in Section 3.5.
Can anyone think of a reason why this won't work?
Simon
_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell