Wanted: warning option for usages of unary minus
isaacdupree at charter.net
Wed Apr 11 06:38:00 EDT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Simon Marlow wrote:
> I definitely think that -1# should be parsed as a single lexeme.
> Presumably it was easier at the time to do it the way it is, I don't
> remember exactly.
> I'd support a warning for use of prefix negation, or alternatively you
> could implement the Haskell' proposal to remove prefix negation
> completely - treat the unary minus as part of a numeric literal in the
> lexer only. This would have to be optional for now, so that we can
> continue to support Haskell 98 of course.
Yes, I've been thinking about how to implement both - details will come
later when I have more time. I think I have a reasonably working idea
of how to divide up the cases for warnings for ambiguous-looking use of
both infix and prefix minus, as well as actual syntax changes...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the Glasgow-haskell-users