building c-callable shared objects and dlls with Haskell

Hello,
What's the current best practice to build shared objects / dlls to
call Haskell from C? I think I figured out the basics, but I would
like to understand the picture completely and document the current
state of affairs in the Haskell wiki. In particular, I'd like to make
sure that the shared libraries are usable from multiple applications,
and ideally that applications can dynamically link to multiple shared
libraries built from Haskell.
I was trying to do that to call Pandoc from C, and the information was
rather scattered.
Here are two links that I used:
http://www.haskell.org/haskellwiki/Calling_Haskell_from_C
http://www.haskell.org/ghc/docs/latest/html/users_guide/win32-dlls.html
Based on that information, I was able to compile and run small
examples. However, I'm not sure I completely understand how it works
in production.
Specifically, for the UNIX version, I followed a recipe for loading
and unloading the Haskell runtime with library
constructors/destructors:
#include
participants (1)
-
Anton Tayanovskyy