summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc146.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/tc146.hs')
-rw-r--r--testsuite/tests/typecheck/should_compile/tc146.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/tc146.hs b/testsuite/tests/typecheck/should_compile/tc146.hs
new file mode 100644
index 0000000000..4f44e908cf
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/tc146.hs
@@ -0,0 +1,15 @@
+{-# LANGUAGE Rank2Types #-}
+
+-- The interesting thign about this one is that
+-- there's an unbound type variable of kind *->*
+-- that the typechecker should default to some
+-- arbitrary type.
+--
+-- GHC 5.02 could only really deal with such things
+-- of kind *, but 5.03 extended that to *->..->*
+-- Still not complete, but a lot better.
+
+module ShouldCompile where
+
+f :: (forall a b . a b -> int) -> (forall c . c int) -> int
+f x y = x y