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

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/4a973d7a7935034992cd7b92a3a4282332bc245e

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

commit 4a973d7a7935034992cd7b92a3a4282332bc245e
Author: Simon Peyton Jones <[email protected]>
Date:   Wed Apr 4 16:03:21 2012 +0100

    Test Trac #5957

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

 tests/typecheck/should_fail/T5957.hs     |    4 ++++
 tests/typecheck/should_fail/T5957.stderr |    6 ++++++
 tests/typecheck/should_fail/all.T        |    1 +
 3 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/tests/typecheck/should_fail/T5957.hs 
b/tests/typecheck/should_fail/T5957.hs
new file mode 100644
index 0000000..c168a00
--- /dev/null
+++ b/tests/typecheck/should_fail/T5957.hs
@@ -0,0 +1,4 @@
+module T5957 where
+
+flex :: Int -> Show a => a -> String
+flex i a = show a ++ show i
diff --git a/tests/typecheck/should_fail/T5957.stderr 
b/tests/typecheck/should_fail/T5957.stderr
new file mode 100644
index 0000000..c0bc12a
--- /dev/null
+++ b/tests/typecheck/should_fail/T5957.stderr
@@ -0,0 +1,6 @@
+
+T5957.hs:3:9:
+    Illegal polymorphic or qualified type: Show a => a -> String
+    Perhaps you intended to use -XRankNTypes or -XRank2Types
+    In the type signature for `flex':
+      flex :: Int -> Show a => a -> String
diff --git a/tests/typecheck/should_fail/all.T 
b/tests/typecheck/should_fail/all.T
index 9d4d6a0..caf92fb 100644
--- a/tests/typecheck/should_fail/all.T
+++ b/tests/typecheck/should_fail/all.T
@@ -271,3 +271,4 @@ test('T5573b', normal, compile_fail, [''])
 test('T5689', normal, compile_fail, [''])
 test('T5684', normal, compile_fail, [''])
 test('T5858', normal, compile_fail, [''])
+test('T5957', normal, compile_fail, [''])



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to