summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/tcfail145.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/tcfail145.hs')
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail145.hs12
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/tcfail145.hs b/testsuite/tests/typecheck/should_fail/tcfail145.hs
new file mode 100644
index 0000000000..d33dc1892f
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/tcfail145.hs
@@ -0,0 +1,12 @@
+{-# LANGUAGE RankNTypes, ScopedTypeVariables #-}
+
+-- This fails, because the type in the pattern doesn't exactly match
+-- the context type. We don't do subsumption in patterns any more.
+
+-- GHC 7.0: now we do again
+
+module Foo where
+
+foo :: (forall c. c -> c) -> [Char]
+foo (f :: forall a. [a] -> [a]) = f undefined
+