Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,322
    • Issues 4,322
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 367
    • Merge Requests 367
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #13718

Closed
Open
Opened May 18, 2017 by Bertram Felgenhauer@int-eReporter

diagnostic colors: differentiate between message head and message body

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 (closed) 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.

Trac metadata
Trac field Value
Version 8.2.1-rc2
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Assignee
Assign to
8.2.1
Milestone
8.2.1 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#13718