summaryrefslogtreecommitdiff
path: root/compiler/ilxGen/tests/test2c.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/ilxGen/tests/test2c.hs')
-rw-r--r--compiler/ilxGen/tests/test2c.hs14
1 files changed, 14 insertions, 0 deletions
diff --git a/compiler/ilxGen/tests/test2c.hs b/compiler/ilxGen/tests/test2c.hs
new file mode 100644
index 0000000000..d01df051f8
--- /dev/null
+++ b/compiler/ilxGen/tests/test2c.hs
@@ -0,0 +1,14 @@
+import PrelIOBase
+
+
+bindIO2 :: IO () -> IO () -> IO ()
+bindIO2 m (IO k) = IO ( \ s -> k s )
+
+foreign import "ilxHello" unsafe ilxHello :: IO ()
+
+data N = S N | Z
+
+f Z = bindIO2
+f (S x) = f x
+
+main = f(S Z) ilxHello ilxHello