blob: 310b75a58d087c7627d76710901f5ecba7791d7d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#include <Rts.h>
void HsStart(void) {
int argc = 3;
char* argv[] = {"ghcDll", "+RTS", "-H50M", NULL}; // argv must end with NULL
// Initialize Haskell runtime
char** args = argv;
#if __GLASGOW_HASKELL__ >= 703
{
RtsConfig conf = defaultRtsConfig;
conf.rts_opts_enabled = RTSOPTS; // RTSOPTS defined on the
// command line with -DRTSOPTS=...
hs_init_ghc(&argc, &args, conf);
}
#else
hs_init(&argc, &args);
#endif
}
void HsEnd(void) {
hs_exit();
}
|