diff options
author | sheaf <sam.derbyshire@gmail.com> | 2022-02-18 17:32:40 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-02-20 13:56:55 -0500 |
commit | 92ab3ff2fbed8847747b43592546f6b98a6d03ec (patch) | |
tree | 680f2e3261740f6deef573d28c4744679cc50093 /testsuite | |
parent | 4b04f7e175a01b30e098af63dfabe6ea068e9b0b (diff) | |
download | haskell-92ab3ff2fbed8847747b43592546f6b98a6d03ec.tar.gz |
Use diagnostics for "missing signature" errors
This patch makes the "missing signature" errors from
"GHC.Rename.Names" use the diagnostic infrastructure.
This encompasses missing type signatures for top-level bindings
and pattern synonyms, as well as missing kind signatures for
type constructors.
This patch also renames TcReportMsg to TcSolverReportMsg,
and adds a few convenience functions to compute whether such a
TcSolverReportMsg is an expected/actual message.
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/driver/werror.stderr | 2 | ||||
-rw-r--r-- | testsuite/tests/warnings/should_compile/Werror01.stderr | 1 | ||||
-rw-r--r-- | testsuite/tests/warnings/should_fail/WerrorFail2.stderr | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/testsuite/tests/driver/werror.stderr b/testsuite/tests/driver/werror.stderr index 2ca8354a91..c74e2e02a5 100644 --- a/testsuite/tests/driver/werror.stderr +++ b/testsuite/tests/driver/werror.stderr @@ -21,7 +21,7 @@ werror.hs:10:1: error: [-Wunused-top-binds (in -Wextra, -Wunused-binds), -Werror 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: (_:_) + In an equation for ‘f’: Patterns of type ‘[a]’ not matched: (_:_) werror.hs:11:1: error: [-Woverlapping-patterns (in -Wdefault), -Werror=overlapping-patterns] Pattern match is redundant diff --git a/testsuite/tests/warnings/should_compile/Werror01.stderr b/testsuite/tests/warnings/should_compile/Werror01.stderr index 91fcc8449f..1cebb3f0d0 100644 --- a/testsuite/tests/warnings/should_compile/Werror01.stderr +++ b/testsuite/tests/warnings/should_compile/Werror01.stderr @@ -1,2 +1,3 @@ + Werror01.hs:5:1: warning: [-Wmissing-signatures (in -Wall)] Top-level binding with no type signature: foo :: () -> () diff --git a/testsuite/tests/warnings/should_fail/WerrorFail2.stderr b/testsuite/tests/warnings/should_fail/WerrorFail2.stderr index 68c642107b..c3bc935392 100644 --- a/testsuite/tests/warnings/should_fail/WerrorFail2.stderr +++ b/testsuite/tests/warnings/should_fail/WerrorFail2.stderr @@ -4,7 +4,7 @@ WerrorFail2.hs:15:1: warning: [-Wmissing-signatures (in -Wall)] WerrorFail2.hs:15:10: error: [-Wincomplete-patterns (in -Wextra), -Werror=incomplete-patterns] Pattern match(es) are non-exhaustive - In a case alternative: Patterns of type ‘S’ not matched: C2 _ + In a case alternative: Patterns of type ‘S’ not matched: C2 _ WerrorFail2.hs:19:1: warning: [-Wmissing-signatures (in -Wall)] Top-level binding with no type signature: printRec :: IO () |