summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2012-04-04 16:03:21 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2012-04-04 16:03:21 +0100
commitdde0085a88d83e5fca8f57039a698dec47c8ffaa (patch)
treebb7a41801c2f9e9936afc5c043117bc6b591dbe3 /testsuite/tests
parentd6ff372fac1392ca0c71d85a4ca6e978d628c04e (diff)
downloadhaskell-dde0085a88d83e5fca8f57039a698dec47c8ffaa.tar.gz
Test Trac #5957
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/typecheck/should_fail/T5957.hs4
-rw-r--r--testsuite/tests/typecheck/should_fail/T5957.stderr6
-rw-r--r--testsuite/tests/typecheck/should_fail/all.T1
3 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T5957.hs b/testsuite/tests/typecheck/should_fail/T5957.hs
new file mode 100644
index 0000000000..c168a00f3a
--- /dev/null
+++ b/testsuite/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/testsuite/tests/typecheck/should_fail/T5957.stderr b/testsuite/tests/typecheck/should_fail/T5957.stderr
new file mode 100644
index 0000000000..c0bc12a7a2
--- /dev/null
+++ b/testsuite/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/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T
index 9d4d6a03c4..caf92fb011 100644
--- a/testsuite/tests/typecheck/should_fail/all.T
+++ b/testsuite/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, [''])