summaryrefslogtreecommitdiff
path: root/testsuite/tests/dynlibs/T4464B.c
blob: c8fd84580bb052d0308c75bfeae92be0c9478b91 (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>

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

    // Initialize Haskell runtime
    char** args = argv;
    {
        RtsConfig conf = defaultRtsConfig;
        conf.rts_opts_enabled = RTSOPTS; // RTSOPTS defined on the
                                         // command line with -DRTSOPTS=...
        hs_init_ghc(&argc, &args, conf);
    }
}

void HsEnd(void) {
    hs_exit();
}