RFC: ghc's dynamic linker
Simon Marlow
simonmar@microsoft.com
Wed, 28 Aug 2002 17:15:40 +0100
> There is another option too, which I find quite attractive. To the
> interface that Simon mentioned:
>=20
> | loadLibrary :: FilePath -> IO ()
> | lookupEntity :: String -> IO a
>=20
> add one more call:
>=20
> addEntity :: String -> a -> IO ()
>=20
> The effect is to extend GHCi's dynamic linker's symbol table with
> an extra binding. So that 'lookupEntity' of the same string would
> return the value you stuffed in with addEntity.
True, but that doesn't address the problem of having to load another
copy of the base package. And I don't think you want to take this
approach for the base package: there will be a huge number of
strange-looking symbols that need to be added due to cross-module
inlining.
On the other hand, this is a pretty short path to getting something
working.
Cheers,
Simon