diff --git a/testsuite/tests/typecheck/should_fail/T5957.hs b/testsuite/tests/typecheck/should_fail/T5957.hs new file mode 100644 index 0000000000000000000000000000000000000000..c168a00f3a357b2207db3e3aaa8d2d6139b6cf04 --- /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 0000000000000000000000000000000000000000..c0bc12a7a2b419197c8939524fac86af2db81dae --- /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 9d4d6a03c4654e990095e7a1e23f04dfadd71e73..caf92fb01149b1b05c5f6956ee3a39b14f08b242 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, [''])