H98 Report: expression syntax glitch
Mon, 25 Feb 2002 15:59:40 +0000
On Mon, Feb 25, 2002 at 03:38:39PM +0000, Malcolm Wallace wrote:
> nhc98 manages to parse and compile both expressions with ease, no doubt
> because it uses parser combinators rather than a table-driven mechanism.
Yes, but it reports type errors for the variants
f x = (\x -> x*x .)
g x = (if x then 1 else 2 +)
and it accepts
h = (let op x y = y in 3 `op`)
so I suspect it's misparsing these as
f x = (\x -> (x*x .))
g x = (if x then 1 else (2 +))
h = (let op x y = y in (3 `op`))
and in the earlier example it didn't make any difference.