summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2013-01-02 16:23:44 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2013-01-02 16:23:44 +0000
commitd056bb324ed633a34fc51bc417abd0e0cf1c12fc (patch)
tree3c82c4efb30dd91678eca722aff699fd59b72073
parent5e1d9d557524e00c0697f964f39e2eea875ef78a (diff)
downloadhaskell-d056bb324ed633a34fc51bc417abd0e0cf1c12fc.tar.gz
Test Trac #7545
-rw-r--r--testsuite/tests/typecheck/should_fail/T7545.hs9
-rw-r--r--testsuite/tests/typecheck/should_fail/T7545.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/all.T1
3 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T7545.hs b/testsuite/tests/typecheck/should_fail/T7545.hs
new file mode 100644
index 0000000000..0acd4f82eb
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T7545.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE RankNTypes, InstanceSigs #-}
+module T7545 where
+
+class C a where
+ f :: a -> b
+
+instance C (a -> b) where
+ f :: x
+ f = undefined
diff --git a/testsuite/tests/typecheck/should_fail/T7545.stderr b/testsuite/tests/typecheck/should_fail/T7545.stderr
new file mode 100644
index 0000000000..1b6a3370d2
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T7545.stderr
@@ -0,0 +1,5 @@
+
+T7545.hs:8:9:
+ Method signature does not match class; it should be
+ f :: forall b1. (a -> b) -> b1
+ In the instance declaration for `C (a -> b)'
diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T
index 644ab38f93..0dc39af06b 100644
--- a/testsuite/tests/typecheck/should_fail/all.T
+++ b/testsuite/tests/typecheck/should_fail/all.T
@@ -291,3 +291,4 @@ test('T7410', normal, compile_fail, [''])
test('T7453', normal, compile_fail, [''])
test('T7525', normal, compile_fail, [''])
test('T7368a', normal, compile_fail, [''])
+test('T7545', normal, compile_fail, [''])