RFC: ghc's dynamic linker
Andre Pang
ozone@algorithm.com.au
Wed, 28 Aug 2002 17:52:04 +1000
On Wed, Aug 28, 2002 at 03:56:36 +1000, Andre Pang wrote:
> In Plugin.hs:
>
> dependentSymbols = ["tail"]
>
> In Program.hs:
>
> loadModule "plugin"
> -- Load the symbols which A, B, C require
> loadFunction "dependentSymbols"
> resolveFunctions
> mapM_ (loadFunction) dependentSymbols
> -- Load A, B, C themselves
> mapM_ (loadFunction) ["A", "B", "C"]
>
> Hopefully I'm not describing non-issues here ...
Sorry, ignore that above code sample; it's complete hogwash --
resolveSymbols tries to resolve all the functions in _all_
currently loaded modules, not just the functions that you load
with loadFunction. That makes that code rather incorrect.
I blame the sushi (mmm, sushi).
--
#ozone/algorithm <ozone@algorithm.com.au> - trust.in.love.to.save