Runtime importing of modules in GHC
Mon, 27 May 2002 16:38:35 +1000
On Mon, May 27, 2002 at 04:31:02PM +1000, Andre Pang wrote:
> The concept: You want to have the equivalent of dlopen(); i.e. be
> able to tell the Haskell runtime system to import a module and
> call functions in that module. As an example, say there's
> a function called adder:
.. and now, my real reason for posting the previous message 8)
Unfortunately, the big limitation of this is that we're going
through the FFI to get things to work.
This kinda sucks because that means that the exported functions
have to stick to exporting one of the prim_types (Int, Char,
Float, Double, Ptr, StablePtr, and a few others).
So, is there some wizardry out there which allows using the RTS
Linker to load up .o modules which are not created with the FFI?
I've been experimenting with it, and I just get segfaults if
I try to load the adder_closure, adder_entry, adder_fast1 or
#ozone/algorithm <firstname.lastname@example.org> - trust.in.love.to.save