Skip to content

Do not highlight Haskell Error № in red

Summary

This is what I see when GHC outputs an error:

ghc

There are three things highlighted in red:

  1. The error label itself.
  2. The Haskell Error number from HEI.
  3. the ^^^^ indicator of where the error lies.

If 1. and 3. are immediately useful visual cues (3. especially, but 1. too, to quickly skim errors — in red — from warnings — in purple), there is no pressing reason to colour the error number in red. The additional red — bold red in fact — makes long output more confusing because now ^^^^ markers stand out less, as there are more red blobs overall.

CLIG says to “use color with intention”, I do not see much benefit here.

Steps to reproduce

$ echo "main = print $ 1 + Bool" > prova.hs
$ ghc prova.hs

Expected behavior

Do not colour GHC-31891 red.

Environment

  • The Glorious Glasgow Haskell Compilation System, version 9.6.3
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information