diff options
author | Phil Ruffwind <rf@rufflewind.com> | 2016-12-22 17:06:51 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-12-23 16:44:47 -0500 |
commit | 158530a5450b27eb5ae2d75b7895fd1662dde13b (patch) | |
tree | 7a0be5291bb05086e6f656f20cdbee23b139a8a8 /utils | |
parent | 8f89e76389569b73ce0d7550302641bbea438dfc (diff) | |
download | haskell-158530a5450b27eb5ae2d75b7895fd1662dde13b.tar.gz |
Add caret diagnostics
This is controlled by -f[no-]diagnostics-show-caret.
Example of what it looks like:
```
|
42 | x = 1 + ()
| ^^^^^^
```
This is appended to each diagnostic message.
Test Plan:
testsuite/tests/warnings/should_fail/CaretDiagnostics1
testsuite/tests/warnings/should_fail/CaretDiagnostics2
Reviewers: simonpj, austin, bgamari
Reviewed By: simonpj, bgamari
Subscribers: joehillen, mpickering, Phyx, simonpj, alanz, thomie
Differential Revision: https://phabricator.haskell.org/D2718
GHC Trac Issues: #8809
Diffstat (limited to 'utils')
-rw-r--r-- | utils/mkUserGuidePart/Options/Verbosity.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/mkUserGuidePart/Options/Verbosity.hs b/utils/mkUserGuidePart/Options/Verbosity.hs index c67fa74b8b..ff1e5a9a90 100644 --- a/utils/mkUserGuidePart/Options/Verbosity.hs +++ b/utils/mkUserGuidePart/Options/Verbosity.hs @@ -68,6 +68,10 @@ verbosityOptions = , flagDescription = "Use colors in error messages" , flagType = DynamicFlag } + , flag { flagName = "-f[no-]diagnostics-show-caret" + , flagDescription = "Whether to show snippets of original source code" + , flagType = DynamicFlag + } , flag { flagName = "-ferror-spans" , flagDescription = "Output full span in error messages" , flagType = DynamicFlag |