diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/tcfail124.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_fail/tcfail124.hs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/tcfail124.hs b/testsuite/tests/typecheck/should_fail/tcfail124.hs new file mode 100644 index 0000000000..729d14b601 --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/tcfail124.hs @@ -0,0 +1,14 @@ +{-# LANGUAGE RankNTypes #-} + +module ShouldFail where + +-- With the new typechecker (GHC 7.1), these now all pass + +f1 :: (forall a. Eq a => [a]) -> Bool +f1 xs@(x:_) = x + +f2 :: (forall a. Eq a => [a]) -> Bool +f2 [x] = x + +f3 :: (forall a. Eq a => [a]) -> Bool +f3 (x:[]) = x |