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 /compiler/main/DynFlags.hs-boot | |
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 'compiler/main/DynFlags.hs-boot')
-rw-r--r-- | compiler/main/DynFlags.hs-boot | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/main/DynFlags.hs-boot b/compiler/main/DynFlags.hs-boot index 5cf21669bd..7d1adc0ab9 100644 --- a/compiler/main/DynFlags.hs-boot +++ b/compiler/main/DynFlags.hs-boot @@ -4,10 +4,14 @@ module DynFlags where import Platform data DynFlags +data OverridingBool targetPlatform :: DynFlags -> Platform pprUserLength :: DynFlags -> Int pprCols :: DynFlags -> Int unsafeGlobalDynFlags :: DynFlags -useUnicode :: DynFlags -> Bool +useUnicode :: DynFlags -> Bool useUnicodeSyntax :: DynFlags -> Bool +useColor :: DynFlags -> OverridingBool +canUseColor :: DynFlags -> Bool +overrideWith :: Bool -> OverridingBool -> Bool |