summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_run/tcrun035.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_run/tcrun035.hs')
-rw-r--r--testsuite/tests/typecheck/should_run/tcrun035.hs16
1 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_run/tcrun035.hs b/testsuite/tests/typecheck/should_run/tcrun035.hs
new file mode 100644
index 0000000000..ee9f27bb7b
--- /dev/null
+++ b/testsuite/tests/typecheck/should_run/tcrun035.hs
@@ -0,0 +1,16 @@
+{-# LANGUAGE Rank2Types #-}
+
+-- Tests subsumption for infix operators (in this case (.))
+-- Broke GHC 6.4!
+
+-- Now it breaks the impredicativity story
+-- (id {a}) . (id {a}) :: a -> a
+-- And (forall m. Monad m => m a) /~ IO a
+
+module Main(main) where
+
+foo :: (forall m. Monad m => m a) -> IO a
+foo = id . id
+
+main :: IO ()
+main = foo (return ())