summaryrefslogtreecommitdiff
path: root/testsuite/tests/dynlibs/T4464B.c
blob: 0cd2845895a77e2292e04acd9d8c4298aec51a75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

#include <Rts.h>

extern void __stginit_T4464H(void);

void HsStart(void) {
    int argc = 3;
    char* argv[] = {"ghcDll", "+RTS", "-H50M", NULL}; // argv must end with NULL

    // Initialize Haskell runtime
    char** args = argv;
    hs_init(&argc, &args);

    // Tell Haskell about all root modules
    hs_add_root(__stginit_T4464H);
}

void HsEnd(void) {
    hs_exit();
}