X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FHscTypes.lhs;h=d385c5f26d4e3aff28af218ed1fae51454b03d8e;hb=88c65644975cb552c8e42d0d998b382d3531cfb3;hp=126f07fa2d27f95a66f729182f1b77c6ad030608;hpb=86bec4298d582ef1d8f0a201d6a81145e1be9498;p=ghc-hetmet.git diff --git a/compiler/main/HscTypes.lhs b/compiler/main/HscTypes.lhs index 126f07f..d385c5f 100644 --- a/compiler/main/HscTypes.lhs +++ b/compiler/main/HscTypes.lhs @@ -73,8 +73,7 @@ import ByteCodeAsm ( CompiledByteCode ) import {-# SOURCE #-} InteractiveEval ( Resume ) #endif -import RdrName ( GlobalRdrEnv, emptyGlobalRdrEnv, - LocalRdrEnv, emptyLocalRdrEnv, GlobalRdrElt(..), +import RdrName ( GlobalRdrEnv, emptyGlobalRdrEnv, GlobalRdrElt(..), unQualOK, ImpDeclSpec(..), Provenance(..), ImportSpec(..), lookupGlobalRdrEnv ) import Name ( Name, NamedThing, getName, nameOccName, nameModule ) @@ -96,7 +95,7 @@ import TyCon import DataCon ( DataCon, dataConImplicitIds ) import PrelNames ( gHC_PRIM ) import Packages ( PackageId ) -import DynFlags ( DynFlags(..), DynFlag(..), isOneShot, HscTarget (..) ) +import DynFlags ( DynFlags(..), isOneShot, HscTarget (..) ) import DriverPhases ( HscSource(..), isHsBoot, hscSourceString, Phase ) import BasicTypes ( Version, initialVersion, IPName, Fixity, defaultFixity, DeprecTxt ) @@ -624,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 @@ -660,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}