diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2015-06-18 08:54:11 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2015-06-18 08:54:11 +0100 |
commit | 5879d5aab929e9959d48e03dad456b824160b3bf (patch) | |
tree | d9c9d012dc9a06f2e0c77fc487ff5a58a8130df1 /testsuite/tests/indexed-types/should_fail | |
parent | 023a0ba938b69bbb89cb2ce48a07459b07783391 (diff) | |
download | haskell-5879d5aab929e9959d48e03dad456b824160b3bf.tar.gz |
Report arity errors correctly despite kinds
Trac #10516 pointed out that when reporting arity errors
(like "T needs 2 arguments but has been given 1"), we should
not count kind arguments, since they are implicit. If we
include kind args in the count, we get very confusing error
messages indeed.
I did a little bit of refactoring which make some
error messages wobble around. But the payload of
this fix is in TcValidity.tyConArityErr
Diffstat (limited to 'testsuite/tests/indexed-types/should_fail')
3 files changed, 11 insertions, 11 deletions
diff --git a/testsuite/tests/indexed-types/should_fail/BadSock.stderr b/testsuite/tests/indexed-types/should_fail/BadSock.stderr index fc3fb54d0c..ed90d8932f 100644 --- a/testsuite/tests/indexed-types/should_fail/BadSock.stderr +++ b/testsuite/tests/indexed-types/should_fail/BadSock.stderr @@ -1,5 +1,5 @@ - -BadSock.hs:30:5: - Type family ‘Readable’ should have 1 argument, but has been given none - In the equations for closed type family ‘Foo’ - In the type family declaration for ‘Foo’ +
+BadSock.hs:30:5: error:
+ The type family ‘Readable’ should have 1 argument, but has been given none
+ In the equations for closed type family ‘Foo’
+ In the type family declaration for ‘Foo’
diff --git a/testsuite/tests/indexed-types/should_fail/T2157.stderr b/testsuite/tests/indexed-types/should_fail/T2157.stderr index 13d436ae43..d2ba6ae53d 100644 --- a/testsuite/tests/indexed-types/should_fail/T2157.stderr +++ b/testsuite/tests/indexed-types/should_fail/T2157.stderr @@ -1,4 +1,4 @@ - -T2157.hs:7:15: - Type synonym ‘S’ should have 2 arguments, but has been given 1 - In the type instance declaration for ‘F’ +
+T2157.hs:7:15: error:
+ The type synonym ‘S’ should have 2 arguments, but has been given 1
+ In the type instance declaration for ‘F’
diff --git a/testsuite/tests/indexed-types/should_fail/T9433.stderr b/testsuite/tests/indexed-types/should_fail/T9433.stderr index 51780f177b..bd4ab42878 100644 --- a/testsuite/tests/indexed-types/should_fail/T9433.stderr +++ b/testsuite/tests/indexed-types/should_fail/T9433.stderr @@ -1,4 +1,4 @@ -T9433.hs:14:6:
- Type family ‘Id’ should have 1 argument, but has been given none
+T9433.hs:14:6: error:
+ The type family ‘Id’ should have 1 argument, but has been given none
In the type signature for ‘x’: x :: Map Id [Bool]
|