summaryrefslogtreecommitdiff
path: root/docs/users_guide/using.rst
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-06-15 11:45:33 +0100
committerMatthew Pickering <matthewtpickering@gmail.com>2022-06-15 11:54:27 +0100
commit127e8cbb3529937b4c3e9ea762ae885d92de6d8d (patch)
treeb4e278a73f8e68eb76b4f04a6b969fc581af32c8 /docs/users_guide/using.rst
parentac83899dcb5931913699d191f2c46780483ed07e (diff)
downloadhaskell-wip/suppress-err-context.tar.gz
Add -fsuppress-error-contexts to disable printing error contexts in errorswip/suppress-err-context
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 ee61a89ce1..a3ccd2c168 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:: -fsuppress-error-contexts
+ :shortdesc: Whether to show textual information about error context
+ :type: dynamic
+ :reverse: -fno-suppress-error-contexts
+ :category: verbosity
+
+ :default: off
+
+ 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