[project @ 2002-02-18 12:41:01 by sewardj]
Make foreign export dynamic work in GHCi. Main changes:
* Allow literal labels to propagate through the bytecode generator
and eventually be linked by the runtime linker.
* Minor mods to driver plumbing so that GHCi produces the relevant
*_stub.[ch] files, compiles them with gcc, and loads the resulting .o's
* Dereference the stable pointer in the generated C stub, rather
than passing it to a Haskell-world helper. This seems simpler and
removes the need to have a H-world helper, which in turn means the
stub .o doesn't refer to any H-world entities. This is important
because our linker can't deal with mutual recursion between
BCOs and loaded objects.
Still ToDo:
* Make it thread/GC safe. (Sigbjorn?)
* Get rid of the bits of code in DsForeign which generate the
Haskell helper. I had a go but it wasn't obvious how to do it,
so have deferred.