Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/c352150a955ede776617cf7edb473205bf2c56fb

>---------------------------------------------------------------

commit c352150a955ede776617cf7edb473205bf2c56fb
Author: Simon Peyton Jones <simo...@microsoft.com>
Date:   Wed Jan 2 16:23:44 2013 +0000

    Test Trac #7545

>---------------------------------------------------------------

 tests/typecheck/should_fail/T7545.hs     |    9 +++++++++
 tests/typecheck/should_fail/T7545.stderr |    5 +++++
 tests/typecheck/should_fail/all.T        |    1 +
 3 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/tests/typecheck/should_fail/T7545.hs 
b/tests/typecheck/should_fail/T7545.hs
new file mode 100644
index 0000000..0acd4f8
--- /dev/null
+++ b/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/tests/typecheck/should_fail/T7545.stderr 
b/tests/typecheck/should_fail/T7545.stderr
new file mode 100644
index 0000000..1b6a337
--- /dev/null
+++ b/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/tests/typecheck/should_fail/all.T 
b/tests/typecheck/should_fail/all.T
index 644ab38..0dc39af 100644
--- a/tests/typecheck/should_fail/all.T
+++ b/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, [''])



_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to