
15 Nov
2010
15 Nov
'10
8:20 a.m.
Hello , ghc 6.12.3. i use the following code to initialize my haskell dll: extern "C" { #include "HsFFI.h" void __stginit_Main(); void haskell_init (void) { static bool initialized = FALSE; if (!initialized) { initialized = TRUE; hs_init(NULL, NULL); hs_add_root(__stginit_Main); } } } but it crashes on hs_add_root call. what may be source of problem? without hs_add_root, it works ok, but crashes on multiple calls from C to haskell functions, probably due to GC of "unused" code :) -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com