summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2018-03-05 14:40:37 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2018-03-05 14:45:28 +0000
commit1c062b794bf71a329f65813ce7b72fe2bd3935f0 (patch)
treed2ff58d11b567cb8d61396006e719de7b2843b0f /testsuite
parent6ee831f279c91888ee5815f8eee473bcd6fd25c6 (diff)
downloadhaskell-1c062b794bf71a329f65813ce7b72fe2bd3935f0.tar.gz
Simplify rnLHsInstType
This patch is preparatory for the main fix for Trac #13324 Here, we simplify rnLHsInstType so that it does not try to figure out the class name. This turns out to have a good (rather than bad) effect on error messages, and it prepares the way for the main event. Plus, less code!
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/parser/should_fail/T3811c.stderr5
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInInstanceHead.stderr2
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInStandaloneDeriving.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/T5513.stderr4
-rw-r--r--testsuite/tests/rename/should_fail/T5951.stderr15
5 files changed, 22 insertions, 6 deletions
diff --git a/testsuite/tests/parser/should_fail/T3811c.stderr b/testsuite/tests/parser/should_fail/T3811c.stderr
index 4a371165fb..dd219184e7 100644
--- a/testsuite/tests/parser/should_fail/T3811c.stderr
+++ b/testsuite/tests/parser/should_fail/T3811c.stderr
@@ -1,2 +1,5 @@
-T3811c.hs:6:10: Malformed instance: !Show D
+T3811c.hs:6:10: error:
+ • Unexpected strictness annotation: !Show
+ strictness annotation cannot appear nested inside a type
+ • In the instance declaration for ‘!Show D’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceHead.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceHead.stderr
index 9090475bc6..367e10a16f 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceHead.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceHead.stderr
@@ -1,4 +1,4 @@
WildcardInInstanceHead.hs:7:14: error:
Wildcard ‘_’ not allowed
- in an instance declaration for ‘Foo’
+ in an instance declaration
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInStandaloneDeriving.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInStandaloneDeriving.stderr
index 8e989108b1..0609021c15 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInStandaloneDeriving.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInStandaloneDeriving.stderr
@@ -1,6 +1,4 @@
-WildcardInStandaloneDeriving.hs:4:19: error: Malformed instance: _
-
WildcardInStandaloneDeriving.hs:4:19: error:
Wildcard ‘_’ not allowed
in a deriving declaration
diff --git a/testsuite/tests/rename/should_fail/T5513.stderr b/testsuite/tests/rename/should_fail/T5513.stderr
index 063f34822b..7e2662283a 100644
--- a/testsuite/tests/rename/should_fail/T5513.stderr
+++ b/testsuite/tests/rename/should_fail/T5513.stderr
@@ -1,2 +1,4 @@
-T5513.hs:4:19: Malformed instance: lowercase_name a
+T5513.hs:4:19: error:
+ • Instance head is not headed by a class
+ • In the stand-alone deriving instance for ‘lowercase_name a’
diff --git a/testsuite/tests/rename/should_fail/T5951.stderr b/testsuite/tests/rename/should_fail/T5951.stderr
index af0ee9d431..8fda353b33 100644
--- a/testsuite/tests/rename/should_fail/T5951.stderr
+++ b/testsuite/tests/rename/should_fail/T5951.stderr
@@ -1,2 +1,15 @@
-T5951.hs:8:8: Malformed instance: A => B => C
+T5951.hs:8:8: error:
+ • Expecting one more argument to ‘A’
+ Expected a constraint, but ‘A’ has kind ‘* -> Constraint’
+ • In the instance declaration for ‘B => C’
+
+T5951.hs:9:8: error:
+ • Expecting one more argument to ‘B’
+ Expected a constraint, but ‘B’ has kind ‘* -> Constraint’
+ • In the instance declaration for ‘B => C’
+
+T5951.hs:10:8: error:
+ • Expecting one more argument to ‘C’
+ Expected a constraint, but ‘C’ has kind ‘* -> Constraint’
+ • In the instance declaration for ‘B => C’