summaryrefslogtreecommitdiff
path: root/testsuite/tests/safeHaskell
diff options
context:
space:
mode:
authorAlfredo Di Napoli <alfredo@well-typed.com>2021-03-01 09:27:54 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-04-01 16:13:23 -0400
commit15b6c9f920d8f60ebfef4580ec7e8f063799a83a (patch)
tree7e40890412df649c043881b57d44e6a157f4108c /testsuite/tests/safeHaskell
parentd44e42a26e54857cc6174f2bb7dc86cc41fcd249 (diff)
downloadhaskell-15b6c9f920d8f60ebfef4580ec7e8f063799a83a.tar.gz
Compute Severity of diagnostics at birth
This commit further expand on the design for #18516 by getting rid of the `defaultReasonSeverity` in favour of a function called `diagReasonSeverity` which correctly takes the `DynFlags` as input. The idea is to compute the `Severity` and the `DiagnosticReason` of each message "at birth", without doing any later re-classifications, which are potentially error prone, as the `DynFlags` might evolve during the course of the program. In preparation for a proper refactoring, now `pprWarning` from the Parser.Ppr module has been renamed to `mkParserWarn`, which now takes a `DynFlags` as input. We also get rid of the reclassification we were performing inside `printOrThrowWarnings`. Last but not least, this commit removes the need for reclassify inside GHC.Tc.Errors, and also simplifies the implementation of `maybeReportError`. Update Haddock submodule
Diffstat (limited to 'testsuite/tests/safeHaskell')
-rw-r--r--testsuite/tests/safeHaskell/overlapping/SH_Overlap7.stderr2
1 files changed, 1 insertions, 1 deletions
diff --git a/testsuite/tests/safeHaskell/overlapping/SH_Overlap7.stderr b/testsuite/tests/safeHaskell/overlapping/SH_Overlap7.stderr
index ce90de4c72..4a4fb3779c 100644
--- a/testsuite/tests/safeHaskell/overlapping/SH_Overlap7.stderr
+++ b/testsuite/tests/safeHaskell/overlapping/SH_Overlap7.stderr
@@ -5,7 +5,7 @@
SH_Overlap7.hs:2:16: error: [-Wunsafe, -Werror=unsafe]
‘SH_Overlap7’ has been inferred as unsafe!
Reason:
- SH_Overlap7.hs:15:8: warning:
+ SH_Overlap7.hs:15:8:
• Unsafe overlapping instances for C [Int]
arising from a use of ‘f’
The matching instance is: