Disable colors unless printing to stderr
authorPhil Ruffwind <rf@rufflewind.com>
Fri, 9 Dec 2016 15:28:25 +0000 (10:28 -0500)
committerBen Gamari <ben@smart-cactus.org>
Fri, 9 Dec 2016 15:28:39 +0000 (10:28 -0500)
commitcee72d5c3c53863bd4fc9f324a93c322448e038e
tree8d3713b912f28fc3dc6a5122a2c655cf1caf5640
parentd3b546b1a6058f26d5659c7f2000a7b25b7ea2ba
Disable colors unless printing to stderr

Only print colors when mkLocMessageAnn is called directly from
defaultLogAction.  This prevents ANSI error codes from cluttering up the
dump files.

Test Plan: validate

Reviewers: austin, bgamari

Reviewed By: bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2792

GHC Trac Issues: #12927
compiler/main/DynFlags.hs
compiler/main/ErrUtils.hs
compiler/utils/Outputable.hs