summaryrefslogtreecommitdiff
path: root/iserv/iservmain.c
diff options
context:
space:
mode:
Diffstat (limited to 'iserv/iservmain.c')
-rw-r--r--iserv/iservmain.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/iserv/iservmain.c b/iserv/iservmain.c
new file mode 100644
index 0000000000..f7eb5664c5
--- /dev/null
+++ b/iserv/iservmain.c
@@ -0,0 +1,16 @@
+#include "../rts/PosixSource.h"
+#include "Rts.h"
+
+#include "HsFFI.h"
+
+int main (int argc, char *argv[])
+{
+ RtsConfig conf = defaultRtsConfig;
+
+ // We never know what symbols GHC will look up in the future, so
+ // we must retain CAFs for running interpreted code.
+ conf.keep_cafs = 1;
+
+ extern StgClosure ZCMain_main_closure;
+ hs_main(argc, argv, &ZCMain_main_closure, conf);
+}