
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Here's a random message selected from building GHC: Warning: Defined but not used: `res_ty'' (the identifier is "res_ty{PRIME}", where {PRIME} is the ' mark) Note that quotes are left:` (grave accent) and right:' (ASCII single quote). Besides this being theoretically incorrect, identifiers can include the ' symbol (generally meaning more like "prime" than "single quote"...), making this look odd. Maybe it should show the identifier-string so that it just has ordinary double-quotes around it?, looking like: Warning: Defined but not used: "res_ty'" Isaac -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGIBIQHgcxvIWYTTURAt5TAKC7Rkbgqr7RsuGEMgyXsMm7kbiIswCdHGs2 lJY8FH7CR8YXwJ47g+0gNWw= =ptnw -----END PGP SIGNATURE-----

A reasonable point. It's one of those matters of taste -- there will be people who hate double-quotes too. Yet another flag? Really we should use colours etc. Any volunteers? Simon | -----Original Message----- | From: glasgow-haskell-users-bounces@haskell.org [mailto:glasgow-haskell-users-bounces@haskell.org] On | Behalf Of Isaac Dupree | Sent: 14 April 2007 00:28 | To: GHC Users | Subject: diagnostics' identifier quoting style | | -----BEGIN PGP SIGNED MESSAGE----- | Hash: SHA1 | | Here's a random message selected from building GHC: | Warning: Defined but not used: `res_ty'' | (the identifier is "res_ty{PRIME}", where {PRIME} is the ' mark) | | Note that quotes are left:` (grave accent) and right:' (ASCII single | quote). Besides this being theoretically incorrect, identifiers can | include the ' symbol (generally meaning more like "prime" than "single | quote"...), making this look odd. Maybe it should show the | identifier-string so that it just has ordinary double-quotes around it?, | looking like: | Warning: Defined but not used: "res_ty'" | | | Isaac | -----BEGIN PGP SIGNATURE----- | Version: GnuPG v1.4.3 (GNU/Linux) | Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org | | iD8DBQFGIBIQHgcxvIWYTTURAt5TAKC7Rkbgqr7RsuGEMgyXsMm7kbiIswCdHGs2 | lJY8FH7CR8YXwJ47g+0gNWw= | =ptnw | -----END PGP SIGNATURE----- | _______________________________________________ | Glasgow-haskell-users mailing list | Glasgow-haskell-users@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

If the output messages were in some sort of structured format then a simple post processor could convert them into whatever style is requested. A post-processor that generates the current messages could be tacked-on to the end of the current compile tool-chain for backward compatibility. This would open the door for tools that colorize the output or provide a mechanism for enhanced IDE integration. Simon Peyton-Jones wrote:
A reasonable point. It's one of those matters of taste -- there will be people who hate double-quotes too. Yet another flag?
Really we should use colours etc. Any volunteers?
Simon
| -----Original Message----- | From: glasgow-haskell-users-bounces@haskell.org [mailto:glasgow-haskell-users-bounces@haskell.org] On | Behalf Of Isaac Dupree | Sent: 14 April 2007 00:28 | To: GHC Users | Subject: diagnostics' identifier quoting style | | -----BEGIN PGP SIGNED MESSAGE----- | Hash: SHA1 | | Here's a random message selected from building GHC: | Warning: Defined but not used: `res_ty'' | (the identifier is "res_ty{PRIME}", where {PRIME} is the ' mark) | | Note that quotes are left:` (grave accent) and right:' (ASCII single | quote). Besides this being theoretically incorrect, identifiers can | include the ' symbol (generally meaning more like "prime" than "single | quote"...), making this look odd. Maybe it should show the | identifier-string so that it just has ordinary double-quotes around it?, | looking like: | Warning: Defined but not used: "res_ty'" | | | Isaac | -----BEGIN PGP SIGNATURE----- | Version: GnuPG v1.4.3 (GNU/Linux) | Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org | | iD8DBQFGIBIQHgcxvIWYTTURAt5TAKC7Rkbgqr7RsuGEMgyXsMm7kbiIswCdHGs2 | lJY8FH7CR8YXwJ47g+0gNWw= | =ptnw | -----END PGP SIGNATURE----- | _______________________________________________ | Glasgow-haskell-users mailing list | Glasgow-haskell-users@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

The messages aren't in a structured format currently; we just use Text.PrettyPrint.HughesPJ (in fact an internal version thereof). However we do paramterise the pretty printer by various things; e.g. whether to qualify identifiers when printing them out, so paramterising by some style options wouldn't be hard. It wouldn't be quite as general as having a type of messages that contained bits of HsSyn, though, but that would require more major refactoring. Cheers, Simon Al Falloon wrote:
If the output messages were in some sort of structured format then a simple post processor could convert them into whatever style is requested.
A post-processor that generates the current messages could be tacked-on to the end of the current compile tool-chain for backward compatibility.
This would open the door for tools that colorize the output or provide a mechanism for enhanced IDE integration.
Simon Peyton-Jones wrote:
A reasonable point. It's one of those matters of taste -- there will be people who hate double-quotes too. Yet another flag?
Really we should use colours etc. Any volunteers?
Simon
| -----Original Message----- | From: glasgow-haskell-users-bounces@haskell.org [mailto:glasgow-haskell-users-bounces@haskell.org] On | Behalf Of Isaac Dupree | Sent: 14 April 2007 00:28 | To: GHC Users | Subject: diagnostics' identifier quoting style | | -----BEGIN PGP SIGNED MESSAGE----- | Hash: SHA1 | | Here's a random message selected from building GHC: | Warning: Defined but not used: `res_ty'' | (the identifier is "res_ty{PRIME}", where {PRIME} is the ' mark) | | Note that quotes are left:` (grave accent) and right:' (ASCII single | quote). Besides this being theoretically incorrect, identifiers can | include the ' symbol (generally meaning more like "prime" than "single | quote"...), making this look odd. Maybe it should show the | identifier-string so that it just has ordinary double-quotes around it?, | looking like: | Warning: Defined but not used: "res_ty'" | | | Isaac | -----BEGIN PGP SIGNATURE----- | Version: GnuPG v1.4.3 (GNU/Linux) | Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org | | iD8DBQFGIBIQHgcxvIWYTTURAt5TAKC7Rkbgqr7RsuGEMgyXsMm7kbiIswCdHGs2 | lJY8FH7CR8YXwJ47g+0gNWw= | =ptnw | -----END PGP SIGNATURE----- | _______________________________________________ | Glasgow-haskell-users mailing list | Glasgow-haskell-users@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
participants (4)
-
Al Falloon
-
Isaac Dupree
-
Simon Marlow
-
Simon Peyton-Jones