• Matthew Pickering's avatar
    Be more careful about retaining KnotVars · 0c5d9ca8
    Matthew Pickering authored
    It is quite easy to end up accidently retaining a KnotVars, which
    contains pointers to a stale TypeEnv because they are placed in the
    One place in particular we have to be careful is when loading a module
    into the EPS in `--make` mode, we have to remove the reference to
    KnotVars as otherwise the interface loading thunks will forever retain
    reference to the KnotVars which are live at the time the interface was
    These changes do not go as far as to enforce the invariant described in
    Note [KnotVar invariants]
    * At the end of upsweep, there should be no live KnotVars
    but at least improve the situation.
    This is left for future work (#20491)
Types.hs 74.2 KB