[GHC] #13718: diagnostic colors: differentiate between message head and message body

GHC ghc-devs at haskell.org
Thu May 18 10:46:22 UTC 2017


#13718: diagnostic colors: differentiate between message head and message body
-------------------------------------+-------------------------------------
           Reporter:  int-e          |             Owner:  (none)
               Type:  feature        |            Status:  new
  request                            |
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.2.1-rc2
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:  #13444
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 When a diagnostic message is printed, currently the whole message is
 colored by the "message" color (bold by default). I'd find it useful if
 the message body and the header could be differentiated (I do like the
 idea that the header stands out).

 Motivation: Consider the following error message,
 {{{
 GHCi, version 8.2.0.20170508: http://www.haskell.org/ghc/  :? for help
 Prelude> () ()

 <interactive>:1:1: error:
     • Couldn't match expected type ‘() -> t’ with actual type ‘()’
     • The function ‘()’ is applied to one argument,
       but its type ‘()’ has none
       In the expression: () ()
       In an equation for ‘it’: it = () ()
     • Relevant bindings include it :: t (bound at <interactive>:1:1)
 }}}
 which by default is all bold, with the {{{error:}}} part in red. I want
 the message body to use normal text. Thanks to #13444 I can achieve that
 by setting {{{GHC_COLORS="message=0"}}}. However, that setting also
 affects the initial {{{<interactive>:1:1}}} part of the headline, which
 now looks odd because normal and bold text are mixed.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13718>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list