Skip to content

ghc-9.6.1-alpha2 outputs color codes in terminals that don't support them

This is most likely because of d3f0ddaf.

This change makes GHC output color codes e.g. in *compilation* buffer in emacs.

Steps to reproduce:

  1. Run echo blah > X.hs.
  2. Run emacs -Q X.hs.
  3. Press Alt-X.
  4. Run compile.
  5. Run ghc --make X.hs.

Expected:

expected

Given:

given

EDIT: Confirmed, reverting d3f0ddaf fixes the issue. It was part of !9639 (closed), I'm not sure if the corresponding change for ghc-pkg also breaks something.

Edited by Andrzej Rybczak
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information