diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2018-05-15 11:36:28 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2018-05-15 11:39:05 +0100 |
commit | f49f90bb84b12515366de9b8184644b5c3798901 (patch) | |
tree | 5a79bca138802785fcad56d127738fc576589668 /testsuite/tests/partial-sigs | |
parent | 79bbb23fd3085c3dc52497175e9e74f73f7f6b68 (diff) | |
download | haskell-f49f90bb84b12515366de9b8184644b5c3798901.tar.gz |
Tidy up error suppression
Trac #15152 showed that when a flag turned an error into a warning, we
were still (alas) suppressing subequent errors; includign their
essential addTcEvBind. That led (rightly) to a Lint error.
This patch fixes it, and incidentally tidies up an ad-hoc special
case of out-of-scope variables (see the old binding for
'out_of_scope_killer' in 'tryReporters').
No test, because the problem was only shown up when turning
inaccessible code into a warning.
Diffstat (limited to 'testsuite/tests/partial-sigs')
-rw-r--r-- | testsuite/tests/partial-sigs/should_fail/T14584.stderr | 11 | ||||
-rw-r--r-- | testsuite/tests/partial-sigs/should_fail/T14584a.stderr | 13 |
2 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/tests/partial-sigs/should_fail/T14584.stderr b/testsuite/tests/partial-sigs/should_fail/T14584.stderr index 65c2381ad4..b7531aa2ce 100644 --- a/testsuite/tests/partial-sigs/should_fail/T14584.stderr +++ b/testsuite/tests/partial-sigs/should_fail/T14584.stderr @@ -1,4 +1,15 @@ +T14584.hs:56:41: warning: [-Wdeferred-type-errors (in -Wdefault)] + • Could not deduce (SingI a) arising from a use of ‘sing’ + from the context: (Action act, Monoid a, Good m1) + bound by the instance declaration at T14584.hs:54:10-89 + • In the second argument of ‘fromSing’, namely + ‘(sing @m @a :: Sing _)’ + In the fourth argument of ‘act’, namely + ‘(fromSing @m (sing @m @a :: Sing _))’ + In the expression: + act @_ @_ @act (fromSing @m (sing @m @a :: Sing _)) + T14584.hs:56:50: warning: [-Wdeferred-type-errors (in -Wdefault)] • Expected kind ‘m1’, but ‘a’ has kind ‘*’ • In the type ‘a’ diff --git a/testsuite/tests/partial-sigs/should_fail/T14584a.stderr b/testsuite/tests/partial-sigs/should_fail/T14584a.stderr index d6be3fc080..5687dcec51 100644 --- a/testsuite/tests/partial-sigs/should_fail/T14584a.stderr +++ b/testsuite/tests/partial-sigs/should_fail/T14584a.stderr @@ -4,6 +4,12 @@ T14584a.hs:12:5: warning: [-Wdeferred-type-errors (in -Wdefault)] • In the expression: id @m :: _ In an equation for ‘f’: f = id @m :: _ +T14584a.hs:12:9: warning: [-Wdeferred-type-errors (in -Wdefault)] + • Expected a type, but ‘m’ has kind ‘k2’ + • In the type ‘m’ + In the expression: id @m :: _ + In an equation for ‘f’: f = id @m :: _ + T14584a.hs:12:14: warning: [-Wpartial-type-signatures (in -Wdefault)] • Found type wildcard ‘_’ standing for ‘m -> m’ Where: ‘m’, ‘k’ are rigid type variables bound by @@ -15,6 +21,13 @@ T14584a.hs:12:14: warning: [-Wpartial-type-signatures (in -Wdefault)] In an equation for ‘f’: f = id @m :: _ • Relevant bindings include f :: () (bound at T14584a.hs:12:1) +T14584a.hs:15:17: warning: [-Wdeferred-type-errors (in -Wdefault)] + • Expected a type, but ‘m’ has kind ‘k2’ + • In the type ‘m’ + In the expression: id @m + In an equation for ‘h’: h = id @m + • Relevant bindings include h :: m -> m (bound at T14584a.hs:15:9) + T14584a.hs:16:8: warning: [-Wdeferred-type-errors (in -Wdefault)] • Couldn't match expected type ‘()’ with actual type ‘m -> m’ • Probable cause: ‘h’ is applied to too few arguments |