[Haskell-cafe] How to reload module that package has linked in memory?

Albert Y. C. Lai trebla at vex.net
Sat Dec 25 21:43:19 CET 2010


On 10-12-25 10:47 AM, Andy Stewart wrote:
> I use Linker.linkPackages and Linker.getHValue to get symbol value, but
> looks Linker.getHValue can't get *update* value once current package has
> linked in memory.
>
> So how to make Linker.getHValue can get *update* value and don't need
> install *new* package in Cabal/GHC database?
> How to *reload* module with current version package?

Cannot be done. I suggest using no packages if you want a module 
refreshed. This is means using GHC.setTargets and GHC.load (I personally 
use loadWithLogger for improved error handling). You can still use 
Linker.getHValue at the end.

See also 
http://thread.gmane.org/gmane.comp.lang.haskell.glasgow.user/18742/focus=18749



More information about the Haskell-Cafe mailing list