summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorPhil Ruffwind <rf@rufflewind.com>2016-11-29 13:31:01 -0500
committerBen Gamari <ben@smart-cactus.org>2016-11-29 14:39:55 -0500
commitf1fc8cbf511c88cb88bf9f46724ee2711f54891a (patch)
tree9f12ae546af62f79b59a85dd172b911dd12e20ee /utils
parent30cecaec4701b32ab9fd6399193c5d2740b63b11 (diff)
downloadhaskell-f1fc8cbf511c88cb88bf9f46724ee2711f54891a.tar.gz
Make diagnostics slightly more colorful
This is a preliminary commit to add colors to diagnostics (warning and error messages). The aesthetic changes are: - 'warning', 'error', and 'fatal' are all colored magenta, red, and red respectively. - The warning annotation [-Wsomething] shares the same color. - Warnings and errors are also bolded (this is consistent with what other compilers do). A new flag has been added to control the behavior: -fdiagnostics-color=(always|auto|never) This flag is 'auto' by default. However, auto-detection is not implemented yet, so it effectively it defaults to off. Test Plan: validate Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2716 GHC Trac Issues: #8809
Diffstat (limited to 'utils')
-rw-r--r--utils/mkUserGuidePart/Options/Verbosity.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/mkUserGuidePart/Options/Verbosity.hs b/utils/mkUserGuidePart/Options/Verbosity.hs
index 8a29d71b75..c187781c06 100644
--- a/utils/mkUserGuidePart/Options/Verbosity.hs
+++ b/utils/mkUserGuidePart/Options/Verbosity.hs
@@ -64,6 +64,10 @@ verbosityOptions =
, flagType = DynamicFlag
, flagReverse = "-fno-print-typechecker-elaboration"
}
+ , flag { flagName = "-fdiagnostics-color=(always|auto|never)"
+ , flagDescription = "Use colors in error messages"
+ , flagType = DynamicFlag
+ }
, flag { flagName = "-ferror-spans"
, flagDescription = "Output full span in error messages"
, flagType = DynamicFlag