clearing GHCi (and, by extension,
hint) loaded module dependencies
i.am at toogeneric.com
Tue Sep 21 20:19:30 EDT 2010
On Tue, Sep 21, 2010 at 10:30 AM, Daniel Gorín <jcpetruzza at gmail.com> wrote:
> What I make of this is that you should run a new interpreter (i.e. use runInterpreter(T)) instead of calling reset.
> Could you try this this approach and see if it works?
Every "load:" call already runs its own interpreter. I guess the
session is sticking around somewhere in-between.
I've been playing around with hint and the GHC API trying to figure
this one out (with Simon's tips in mind), but haven't found a way to
discard the session, or even on what level that should be done. In
runInterpreter? Or in separate runGhc calls? The best guess I have so
far is using getSession/setSession inside the interpreter call to
restore it to the way it was before, but that seems to have no effect.
Here's what I'm using to test: http://hpaste.org/40015/hintghc_memory
Even with setSession, the cache seems to be sticking around -
subsequent loads are faster, and the memory usage doesn't go down.
More information about the Glasgow-haskell-users