logo       

Re: quoting in error messages: msg#00028

lang.haskell.glasgow.bugs

Subject: Re: quoting in error messages

Simon Marlow <simonmarhaskell@xxxxxxxxx> wrote:

> > > `thing'
> > > "thing"
>
> We should be using Unicode left/right single quotes if the locale
> supports it (U+2018, U+2019). Better still, use a different color for
> quoted code fragments if the terminal supports it.

You could make the highlighting style a configurable item (in ghci).
Let the user choose whether they want bold, underlined, pink, flashing,
some form of quoting (or all of the above :-).

For ordinary ghc, you could still take the preference from the .ghci
configuration, or default to some anodyne choice that is supported
everywhere. But please, the `' pair is not only ugly, but confusing
when the expression itself can contain either or both of those
characters, so almost any other choice would be better.

> Double quotes would be slightly preferable to the existing grotesque
> use of the grave accent as a left quotation mark, I suppose (but
> would break a *lot* of tests :-).

If it is configurable, you could set the quotes back to `' just for the
purposes of the test harness.

Regards,
Malcolm


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise