>Simon Peyton-Jones <[EMAIL PROTECTED]> writes:
>
>> > One additional comment. I frequently use quotes (') as suffixes
>> > for identifier and type names. As can be seen above ghc loves adding
>> > quotes (` and ') around parts of its messages. This becomes *very*
>> > confusing when the last part of the message consists of an
>> > identifier suffixed by a one or more quote symbols.
>> 
>> I've noticed this too, but the trouble is that if you leave the quotes
>> out then identifiers tend to get lost in the text.  Better ideas welcome.
>
>Well, you could always use different quoting characters.  Rather than
>`Int'', you could use any of:
>
>"Int'"
>(Int')
>[Int']
>{Int'}
><< Int' >>
>` Int' '

The Objective Caml interpreter checks the current terminal to see if it supports 
emphasizing text, for example by boldfacing or underlining text, and cursor 
positioning; when the input contains an error, in addition to an error message that 
indicates the position, it jumps back to the expression that was just entered, and 
overwrites it with the relevant subexpression(s) emphasized.  It's a real eye-catcher, 
and very user-friendly, IYAM.

Maybe GHC could do a similar check and try to emphasize Haskell expressions, using the 
current method as a fallback (or enable the emphasizing behavior with a command-line 
flag).  Even if you redirect the error output to a file it should show up nicely 
provided you use a pager like more to view it.  (Think of man pages.)

--FC

Reply via email to