summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCamil Staps2016-03-10 15:28:15 +0100
committerCamil Staps2016-03-10 15:28:15 +0100
commitacfacc2f3e59239a1fd9f3963a58cca2e7eb0c18 (patch)
tree24811876fa65a9dc9788e68bfb031b9482b46d34
parentZF implementation (diff)
mkworld
-rw-r--r--mkworld/test.c6
-rw-r--r--mkworld/test.icl16
2 files changed, 22 insertions, 0 deletions
diff --git a/mkworld/test.c b/mkworld/test.c
new file mode 100644
index 0000000..953f030
--- /dev/null
+++ b/mkworld/test.c
@@ -0,0 +1,6 @@
+#include <inttypes.h>
+
+int64_t mkworld(int64_t x) {
+ return x;
+}
+
diff --git a/mkworld/test.icl b/mkworld/test.icl
new file mode 100644
index 0000000..0e2a87c
--- /dev/null
+++ b/mkworld/test.icl
@@ -0,0 +1,16 @@
+module test
+
+import StdEnv
+
+Start
+# w = mkWorld 42
+# (io, w) = stdio w
+# io = fwrites "Hello world!\n" io
+# (ok, w) = fclose io w
+= ok
+
+mkWorld :: Int -> *World
+mkWorld x = code {
+ ccall mkworld "I:p"
+}
+