Reorganisation of the source tree
[ghc-hetmet.git] / compiler / ilxGen / tests / test2c.hs
diff --git a/compiler/ilxGen/tests/test2c.hs b/compiler/ilxGen/tests/test2c.hs
new file mode 100644 (file)
index 0000000..d01df05
--- /dev/null
@@ -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