List Info

Thread: Parsing issue with 1e12




Parsing issue with 1e12
user name
2006-09-29 00:47:23
Hi Hat and Yhc people (and I guess nhc people as well),

Both GHC and Hugs parse 1e12 as a number, but Hat and Yhc
don't.

For example, test = print 1e12 gives:
yhc: -- during when renaming
Error: Identifier e12 used at 7:15-7:17 is not defined.

I have also been told that Hat leads to an error.

So:

1) Is this an error, what does the Haskell spec say?

2) Should the parser be fixed in all the right places? (does
this
impact Colin's hpc as well?)

Thanks

Neil
_______________________________________________
Hat mailing list
Hathaskell.org
http://ww
w.haskell.org/mailman/listinfo/hat
Parsing issue with 1e12
user name
2006-09-29 08:24:37
"Neil Mitchell" <ndmitchellgmail.com> writes:

> Both GHC and Hugs parse 1e12 as a number, but Hat and
Yhc don't.

I suspect this was an unnoticed change in the Haskell Report
spec.
Originally I think the exponent form was allowed only if
there was a
decimal point before the 'e'.  I see this is no longer the
case.
Yes, this is likely to affect the hpc parser as well.

Regards,
    Malcolm
_______________________________________________
Hat mailing list
Hathaskell.org
http://ww
w.haskell.org/mailman/listinfo/hat
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )