diff options
Diffstat (limited to 'testsuite/tests')
-rw-r--r-- | testsuite/tests/typecheck/should_fail/T5957.hs | 4 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/T5957.stderr | 6 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/all.T | 1 |
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, ['']) |