summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/T7609.stderr
diff options
context:
space:
mode:
authorRichard Eisenberg <rae@cs.brynmawr.edu>2017-06-14 16:35:18 -0400
committerRichard Eisenberg <rae@cs.brynmawr.edu>2017-07-27 07:49:06 -0400
commitc2417b87ff59c92fbfa8eceeff2a0d6152b11a47 (patch)
tree75d37ad9c2c6e820d6965c4aba191a9173f0edc5 /testsuite/tests/typecheck/should_fail/T7609.stderr
parent79cfb1999474ad15dd955a10c846c8ea87e612c2 (diff)
downloadhaskell-c2417b87ff59c92fbfa8eceeff2a0d6152b11a47.tar.gz
Fix #13819 by refactoring TypeEqOrigin.uo_thing
The uo_thing field of TypeEqOrigin is used to track the "thing" (either term or type) that has the type (kind) stored in the TypeEqOrigin fields. Previously, this was sometimes a proper Core Type, which needed zonking and tidying. Now, it is only HsSyn: much simpler, and the error messages now use the user-written syntax. But this aspect of uo_thing didn't cause #13819; it was the sibling field uo_arity that did. uo_arity stored the number of arguments of uo_thing, useful when reporting something like "should have written 2 fewer arguments". We wouldn't want to say that if the thing didn't have two arguments. However, in practice, GHC was getting this wrong, and this message didn't seem all that helpful. Furthermore, the calculation of the number of arguments is what caused #13819 to fall over. This patch just removes uo_arity. In my opinion, the change to error messages is a nudge in the right direction. Test case: typecheck/should_fail/T13819
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/T7609.stderr')
-rw-r--r--testsuite/tests/typecheck/should_fail/T7609.stderr11
1 files changed, 4 insertions, 7 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T7609.stderr b/testsuite/tests/typecheck/should_fail/T7609.stderr
index 24339311b8..32bc980fe9 100644
--- a/testsuite/tests/typecheck/should_fail/T7609.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7609.stderr
@@ -2,16 +2,13 @@
T7609.hs:7:16: error:
• Expecting one more argument to ‘Maybe’
Expected a type, but ‘Maybe’ has kind ‘* -> *’
- • In the type signature:
- f :: (a `X` a, Maybe)
+ • In the type signature: f :: (a `X` a, Maybe)
T7609.hs:10:7: error:
- • Expected a constraint, but ‘X a a’ has kind ‘*’
- • In the type signature:
- g :: (a `X` a) => Maybe
+ • Expected a constraint, but ‘a `X` a’ has kind ‘*’
+ • In the type signature: g :: (a `X` a) => Maybe
T7609.hs:10:19: error:
• Expecting one more argument to ‘Maybe’
Expected a type, but ‘Maybe’ has kind ‘* -> *’
- • In the type signature:
- g :: (a `X` a) => Maybe
+ • In the type signature: g :: (a `X` a) => Maybe