diff options
author | Phil Ruffwind <rf@rufflewind.com> | 2016-11-29 13:31:01 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-11-29 14:39:55 -0500 |
commit | f1fc8cbf511c88cb88bf9f46724ee2711f54891a (patch) | |
tree | 9f12ae546af62f79b59a85dd172b911dd12e20ee /docs/users_guide/using.rst | |
parent | 30cecaec4701b32ab9fd6399193c5d2740b63b11 (diff) | |
download | haskell-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 'docs/users_guide/using.rst')
-rw-r--r-- | docs/users_guide/using.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/users_guide/using.rst b/docs/users_guide/using.rst index 1d7f52c8e6..f5761a4434 100644 --- a/docs/users_guide/using.rst +++ b/docs/users_guide/using.rst @@ -786,6 +786,15 @@ messages and in GHCi: in a’ or by using the flag -fno-warn-unused-do-bind +.. ghc-flag:: -fdiagnostics-color=(always|auto|never) + + Causes GHC to display error messages with colors. To do this, the + terminal must have support for ANSI color codes, or else garbled text will + appear. The default value is `auto`, which means GHC will make an attempt + to detect whether terminal supports colors and choose accordingly. (Note: + the detection mechanism is not yet implemented, so colors are off by + default on all platforms.) + .. ghc-flag:: -ferror-spans Causes GHC to emit the full source span of the syntactic entity |