summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck
diff options
context:
space:
mode:
authorRichard Eisenberg <eir@cis.upenn.edu>2015-06-08 15:57:33 -0400
committerRichard Eisenberg <eir@cis.upenn.edu>2015-06-16 14:22:51 -0400
commit0de0b14691e0b0789988332ad5addc2a31b09ba6 (patch)
tree19cd1fb41aa065a11b03d0e92a6355f83f9f5392 /testsuite/tests/typecheck
parentc772f57e128e04415949f91f299ec9bcc60c4caf (diff)
downloadhaskell-0de0b14691e0b0789988332ad5addc2a31b09ba6.tar.gz
Fix #10495.
This change means that the intricate reasoning in TcErrors around getting messages just right for nominal equalities is skipped for representational equalities.
Diffstat (limited to 'testsuite/tests/typecheck')
-rw-r--r--testsuite/tests/typecheck/should_fail/T10495.hs5
-rw-r--r--testsuite/tests/typecheck/should_fail/T10495.stderr6
-rw-r--r--testsuite/tests/typecheck/should_fail/all.T1
3 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T10495.hs b/testsuite/tests/typecheck/should_fail/T10495.hs
new file mode 100644
index 0000000000..2573f51875
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T10495.hs
@@ -0,0 +1,5 @@
+module T10495 where
+
+import Data.Coerce
+
+foo = coerce
diff --git a/testsuite/tests/typecheck/should_fail/T10495.stderr b/testsuite/tests/typecheck/should_fail/T10495.stderr
new file mode 100644
index 0000000000..6e92505504
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T10495.stderr
@@ -0,0 +1,6 @@
+
+T10495.hs:5:7: error:
+ Couldn't match representation of type ‘a0’ with that of ‘b0’
+ Relevant bindings include foo :: a0 -> b0 (bound at T10495.hs:5:1)
+ In the expression: coerce
+ In an equation for ‘foo’: foo = coerce
diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T
index eeb410f0ef..7b0f5fb7de 100644
--- a/testsuite/tests/typecheck/should_fail/all.T
+++ b/testsuite/tests/typecheck/should_fail/all.T
@@ -367,3 +367,4 @@ test('T10285',
test('T10351', normal, compile_fail, [''])
test('T10534', extra_clean(['T10534a.hi', 'T10534a.o']),
multimod_compile_fail, ['T10534', '-v0'])
+test('T10495', normal, compile_fail, [''])