Wanted: warning option for usages of unary minus

Isaac Dupree isaacdupree at charter.net
Sat May 19 10:00:35 EDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John Meacham wrote:
> another option would be to only count it as a negative if there is a
> non-identifier character preceeding it. A little ugly. but still better
> than the current situation IMHO.

I think Ghc's lexer "Alex" can do this although this functionality is
not used anywhere else... it seems a little out of character.  I don't
really like that "(3-2)-1" would be parsed differently because it's a
parenthesized expression; consider "3^2-1" vs. "(3^2)-1" ...

Isaac

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGTwMCHgcxvIWYTTURAkzHAKCdekuA6rUw4QcnIV3Qq9WJ8ZkljQCfTH5G
c0jDDrAGLtBVZ4WVRdTDJu8=
=1BDf
-----END PGP SIGNATURE-----


More information about the Haskell-prime mailing list