summaryrefslogtreecommitdiff
path: root/compiler/main/ErrUtils.hs
diff options
context:
space:
mode:
authorPhil Ruffwind <rf@rufflewind.com>2017-05-22 12:00:34 -0400
committerBen Gamari <ben@smart-cactus.org>2017-05-22 12:41:20 -0400
commit139ef04bdbd14b74dd6202295e11a37295442fc8 (patch)
treefe4bcac54572dda10616fc9dfa9e6a0ce7c30cb1 /compiler/main/ErrUtils.hs
parentdac49bdc79387ca9f91c7c5c9220699efb6239fb (diff)
downloadhaskell-139ef04bdbd14b74dd6202295e11a37295442fc8.tar.gz
Add "header" to GHC_COLORS
Add "header" to GHC_COLORS and allow colors to be inherited from the surroundings. Test Plan: validate Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #13718 Differential Revision: https://phabricator.haskell.org/D3599
Diffstat (limited to 'compiler/main/ErrUtils.hs')
-rw-r--r--compiler/main/ErrUtils.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/main/ErrUtils.hs b/compiler/main/ErrUtils.hs
index b0bbe3c9e4..40f6648cd0 100644
--- a/compiler/main/ErrUtils.hs
+++ b/compiler/main/ErrUtils.hs
@@ -209,10 +209,12 @@ mkLocMessageAnn ann severity locn msg
-- Add prefixes, like Foo.hs:34: warning:
-- <the warning message>
- prefix = locn' <> colon <+>
+ header = locn' <> colon <+>
coloured sevColour sevText <> optAnn
- in coloured (Col.sMessage (colScheme dflags)) (hang prefix 4 msg)
+ in coloured (Col.sMessage (colScheme dflags))
+ (hang (coloured (Col.sHeader (colScheme dflags)) header) 4
+ msg)
where
sevText =