X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FHscTypes.lhs;h=d385c5f26d4e3aff28af218ed1fae51454b03d8e;hb=88c65644975cb552c8e42d0d998b382d3531cfb3;hp=f04615a6e1e8a260946d4dce71a59ad521eacd69;hpb=e546aeee4ad0e2058250440e9a199665f84b5959;p=ghc-hetmet.git diff --git a/compiler/main/HscTypes.lhs b/compiler/main/HscTypes.lhs index f04615a..d385c5f 100644 --- a/compiler/main/HscTypes.lhs +++ b/compiler/main/HscTypes.lhs @@ -623,8 +623,8 @@ data InteractiveContext -- ic_toplev_scope and ic_exports ic_tmp_ids :: [Id], -- Names bound during interaction. - -- Earlier Ids shadow - -- later ones with the same OccName. + -- Later Ids shadow + -- earlier ones with the same OccName. ic_tyvars :: TyVarSet -- skolem type variables free in -- ic_tmp_ids. These arise at @@ -659,7 +659,9 @@ extendInteractiveContext -> TyVarSet -> InteractiveContext extendInteractiveContext ictxt ids tyvars - = ictxt { ic_tmp_ids = ids ++ ic_tmp_ids ictxt, + = ictxt { ic_tmp_ids = ic_tmp_ids ictxt ++ ids, + -- NB. must be this way around, because we want + -- new ids to shadow existing bindings. ic_tyvars = ic_tyvars ictxt `unionVarSet` tyvars } \end{code}