diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2022-10-18 15:26:52 +0200 |
---|---|---|
committer | sheaf <sam.derbyshire@gmail.com> | 2022-10-18 16:15:53 +0200 |
commit | 99dc3e3d76daab80a5c5209a3e0c44c9e4664e06 (patch) | |
tree | 0b35945d26b055fe4b0eb47d12099b4d1ec61279 /testsuite | |
parent | e1bbd36841e19812c7ed544b66256da82ce68fd5 (diff) | |
download | haskell-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 'testsuite')
-rw-r--r-- | testsuite/tests/driver/T21722.hs | 6 | ||||
-rw-r--r-- | testsuite/tests/driver/T21722.stderr | 5 | ||||
-rw-r--r-- | testsuite/tests/driver/all.T | 1 |
3 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/driver/T21722.hs b/testsuite/tests/driver/T21722.hs new file mode 100644 index 0000000000..fe40aadc61 --- /dev/null +++ b/testsuite/tests/driver/T21722.hs @@ -0,0 +1,6 @@ +module T21722 where + +main = print () + where + foo :: Int + foo = "abc" diff --git a/testsuite/tests/driver/T21722.stderr b/testsuite/tests/driver/T21722.stderr new file mode 100644 index 0000000000..e66bbb3bea --- /dev/null +++ b/testsuite/tests/driver/T21722.stderr @@ -0,0 +1,5 @@ + +T21722.hs:6:11: error: [GHC-83865] + Couldn't match type β[Char]β with βIntβ + Expected: Int + Actual: String diff --git a/testsuite/tests/driver/all.T b/testsuite/tests/driver/all.T index 6a0932e9b0..3d1b417c91 100644 --- a/testsuite/tests/driver/all.T +++ b/testsuite/tests/driver/all.T @@ -313,3 +313,4 @@ test('T21349', extra_files(['T21349']), makefile_test, []) test('T21869', [normal, when(unregisterised(), skip)], makefile_test, []) test('T22044', normal, makefile_test, []) test('T22048', [only_ways(['normal']), grep_errmsg("_rule")], compile, ["-O -fomit-interface-pragmas -ddump-simpl"]) +test('T21722', normal, compile_fail, ['-fno-show-error-context']) |