summaryrefslogtreecommitdiff
path: root/docs/users_guide/using.rst
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-10-18 15:26:52 +0200
committersheaf <sam.derbyshire@gmail.com>2022-10-18 16:15:53 +0200
commit99dc3e3d76daab80a5c5209a3e0c44c9e4664e06 (patch)
tree0b35945d26b055fe4b0eb47d12099b4d1ec61279 /docs/users_guide/using.rst
parente1bbd36841e19812c7ed544b66256da82ce68fd5 (diff)
downloadhaskell-99dc3e3d76daab80a5c5209a3e0c44c9e4664e06.tar.gz
Add -fsuppress-error-contexts to disable printing error contexts in errorswip/diagnostics-config
In many development environments, the source span is the primary means of seeing what an error message relates to, and the In the expression: and In an equation for: clauses are not particularly relevant. However, they can grow to be quite long, which can make the message itself both feel overwhelming and interact badly with limited-space areas. It's simple to implement this flag so we might as well do it and give the user control about how they see their messages. Fixes #21722
Diffstat (limited to 'docs/users_guide/using.rst')
-rw-r--r--docs/users_guide/using.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/users_guide/using.rst b/docs/users_guide/using.rst
index ca8d75860f..ecb64bbdb2 100644
--- a/docs/users_guide/using.rst
+++ b/docs/users_guide/using.rst
@@ -1360,6 +1360,18 @@ messages and in GHCi:
error was detected. This also affects the associated caret symbol that
points at the region of code at fault.
+.. ghc-flag:: -fshow-error-context
+ :shortdesc: Whether to show textual information about error context
+ :type: dynamic
+ :reverse: -fno-show-error-context
+ :category: verbosity
+
+ :default: on
+
+ Controls whether GHC displays information about the context in which an
+ error occurred. This controls whether the part of the error message which
+ says "In the equation..", "In the pattern.." etc is displayed or not.
+
.. ghc-flag:: -ferror-spans
:shortdesc: Output full span in error messages
:type: dynamic