Runtime importing of modules in GHC

MR K P SCHUPKE k.schupke@ic.ac.uk
Mon, 27 May 2002 11:31:17 +0100


Here's how I did it...  load your main program _and_ modules into a
linker
shell program.

    Keean.

Andre Pang wrote:

> 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
> adder_info symbols.
>
> --
> #ozone/algorithm <ozone@algorithm.com.au>          -
trust.in.love.to.save
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users@haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users