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 /docs | |
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 'docs')
-rw-r--r-- | docs/users_guide/using.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/users_guide/using.rst b/docs/users_guide/using.rst index 460201eb92..7b01fc27b6 100644 --- a/docs/users_guide/using.rst +++ b/docs/users_guide/using.rst @@ -800,6 +800,12 @@ messages and in GHCi: the detection mechanism is not yet implemented, so colors are off by default on all platforms.) +.. ghc-flag:: -f[no-]diagnostics-show-caret + + Controls whether GHC displays a line of the original source code where the + error was detected. This also affects the associated caret symbol that + points at the region of code at fault. The flag is on by default. + .. ghc-flag:: -ferror-spans Causes GHC to emit the full source span of the syntactic entity |