diff options
author | Alfredo Di Napoli <alfredo@well-typed.com> | 2021-03-26 10:17:26 +0100 |
---|---|---|
committer | Alfredo Di Napoli <alfredo@well-typed.com> | 2021-03-29 07:58:00 +0200 |
commit | c30af95189c5006ac5cd10839a8ea7e8098341d5 (patch) | |
tree | 8863e8d15ab33363147594dbab2d54cf7cb42a48 /testsuite/tests/driver/werror.stderr | |
parent | 9c9e40e59214b1e358c85852218f3a67e712a748 (diff) | |
download | haskell-c30af95189c5006ac5cd10839a8ea7e8098341d5.tar.gz |
Add `MessageClass`, rework `Severity` and add `DiagnosticReason`.wip/adinapoli-message-class-new-design
Other than that:
* Fix T16167,json,json2,T7478,T10637 tests to reflect the introduction of
the `MessageClass` type
* Remove `makeIntoWarning`
* Remove `warningsToMessages`
* Refactor GHC.Tc.Errors
1. Refactors GHC.Tc.Errors so that we use `DiagnosticReason` for "choices"
(defer types errors, holes, etc);
2. We get rid of `reportWarning` and `reportError` in favour of a general
`reportDiagnostic`.
* Introduce `DiagnosticReason`, `Severity` is an enum: This big commit makes
`Severity` a simple enumeration, and introduces the concept of `DiagnosticReason`,
which classifies the /reason/ why we are emitting a particular diagnostic.
It also adds a monomorphic `DiagnosticMessage` type which is used for
generic messages.
* The `Severity` is computed (for now) from the reason, statically.
Later improvement will add a `diagReasonSeverity` function to compute
the `Severity` taking `DynFlags` into account.
* Rename `logWarnings` into `logDiagnostics`
* Add note and expand description of the `mkHoleError` function
Diffstat (limited to 'testsuite/tests/driver/werror.stderr')
-rw-r--r-- | testsuite/tests/driver/werror.stderr | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/testsuite/tests/driver/werror.stderr b/testsuite/tests/driver/werror.stderr index 791c74352b..7af5fb086f 100644 --- a/testsuite/tests/driver/werror.stderr +++ b/testsuite/tests/driver/werror.stderr @@ -2,23 +2,23 @@ werror.hs:6:1: error: [-Wmissing-signatures (in -Wall), -Werror=missing-signatures] Top-level binding with no type signature: main :: IO () +werror.hs:7:13: error: [-Wunused-local-binds (in -Wextra, -Wunused-binds), -Werror=unused-local-binds] + Defined but not used: ‘main’ + werror.hs:7:13: error: [-Wname-shadowing (in -Wall), -Werror=name-shadowing] This binding for ‘main’ shadows the existing binding defined at werror.hs:6:1 -werror.hs:7:13: error: [-Wunused-local-binds (in -Wextra, -Wunused-binds), -Werror=unused-local-binds] - Defined but not used: ‘main’ - werror.hs:8:1: error: [-Wtabs (in -Wdefault), -Werror=tabs] Tab character found here. Please use spaces instead. -werror.hs:10:1: error: [-Wunused-top-binds (in -Wextra, -Wunused-binds), -Werror=unused-top-binds] - Defined but not used: ‘f’ - werror.hs:10:1: error: [-Wmissing-signatures (in -Wall), -Werror=missing-signatures] Top-level binding with no type signature: f :: [a1] -> [a2] +werror.hs:10:1: error: [-Wunused-top-binds (in -Wextra, -Wunused-binds), -Werror=unused-top-binds] + Defined but not used: ‘f’ + werror.hs:10:1: error: [-Wincomplete-patterns (in -Wextra), -Werror=incomplete-patterns] Pattern match(es) are non-exhaustive In an equation for ‘f’: Patterns of type ‘[a]’ not matched: (_:_) |