Hs2lib-0.5.7: Templates/nomain.template-win.c
#include <windows.h>
#include <Rts.h>
extern void __stginit_%name(void);
void __declspec(dllexport) __%callconv HsStart(void)
{
int argc = 1;
char* argv[] = {"ghcDll", 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_%name);
}
void __declspec(dllexport) __%callconv HsEnd(void)
{
hs_exit();
}