diff options
author | Simon Marlow <simonmar@microsoft.com> | 2007-11-07 16:14:54 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2007-11-07 16:14:54 +0000 |
commit | 23e4e1039c16bb30fec04b5006bfc0f4989239d9 (patch) | |
tree | 19015ed84316211c775579712334888226fbb5bc | |
parent | 427f3443a432cde66da1e8dde94ef9c5351636da (diff) | |
download | haskell-23e4e1039c16bb30fec04b5006bfc0f4989239d9.tar.gz |
FIX #1617: reloading didn't change the :browse output as it should
The problem was that because the interface hadn't changed, we were
re-using the old ModIface. Unfortunately the ModIface contains the
GlobalRdrEnv for the module, and that *had* changed. The fix is to
put the new GlobalRdrEnv in the ModIface even if the interface has not
otherwise changed.
ModIface is not really the right place for the GlobalRdrEnv, but
neither is ModDetails, so we should think about a better way to do
this.
-rw-r--r-- | compiler/iface/MkIface.lhs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/iface/MkIface.lhs b/compiler/iface/MkIface.lhs index 33b18c41ac..c0b9717c64 100644 --- a/compiler/iface/MkIface.lhs +++ b/compiler/iface/MkIface.lhs @@ -423,7 +423,13 @@ mkIface_ hsc_env maybe_old_iface ; dumpIfSet_dyn dflags Opt_D_dump_hi "FINAL INTERFACE" (pprModIface new_iface) - ; return (new_iface, no_change_at_all) } + -- bug #1617: on reload we weren't updating the PrintUnqualified + -- correctly. This stems from the fact that the interface had + -- not changed, so addVersionInfo returns the old ModIface + -- with the old GlobalRdrEnv (mi_globals). + ; let final_iface = new_iface{ mi_globals = Just rdr_env } + + ; return (final_iface, no_change_at_all) } where r1 `le_rule` r2 = ifRuleName r1 <= ifRuleName r2 i1 `le_inst` i2 = ifDFun i1 `le_occ` ifDFun i2 |