summaryrefslogtreecommitdiff
path: root/testsuite/tests/boxy/SystemF.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/boxy/SystemF.hs')
-rw-r--r--testsuite/tests/boxy/SystemF.hs21
1 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/tests/boxy/SystemF.hs b/testsuite/tests/boxy/SystemF.hs
new file mode 100644
index 0000000000..3f5b4b957a
--- /dev/null
+++ b/testsuite/tests/boxy/SystemF.hs
@@ -0,0 +1,21 @@
+{-# LANGUAGE Rank2Types #-}
+
+module SystemF where
+-- System-F examples
+
+
+type Sid = forall a. a -> a
+
+apply :: forall a b . (a -> b) -> a -> b
+apply f g = f g
+
+hr :: (forall a. a -> a) -> (Int,Bool)
+hr f = (f 3,f True)
+
+test0 = apply hr id -- requires smart-app-arg
+
+selfApp :: Sid -> Sid
+selfApp x = (x::(Sid -> Sid)) x
+
+
+