From: simonpj Date: Thu, 6 Feb 2003 17:11:14 +0000 (+0000) Subject: [project @ 2003-02-06 17:11:13 by simonpj] X-Git-Tag: Approx_11550_changesets_converted~1196 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=e2971311b54ed42ae2a2e05076a67fb8d26fcadb;p=ghc-hetmet.git [project @ 2003-02-06 17:11:13 by simonpj] Minor tidy up of known-key names --- diff --git a/ghc/compiler/main/HscMain.lhs b/ghc/compiler/main/HscMain.lhs index 336e2ce..d360dd9 100644 --- a/ghc/compiler/main/HscMain.lhs +++ b/ghc/compiler/main/HscMain.lhs @@ -44,7 +44,7 @@ import SrcLoc ( mkSrcLoc, noSrcLoc ) import TcRnDriver ( checkOldIface, tcRnModule, tcRnExtCore, tcRnIface ) import RnEnv ( extendOrigNameCache ) import Rules ( emptyRuleBase ) -import PrelInfo ( wiredInThingEnv, wiredInThings, knownKeyNames ) +import PrelInfo ( wiredInThingEnv, knownKeyNames ) import PrelRules ( builtinRules ) import MkIface ( mkIface ) import InstEnv ( emptyInstEnv ) @@ -722,10 +722,5 @@ initExternalPackageState gate_fn vis_fn = vis_fn name -- Load the rule whenever name is visible initOrigNames :: OrigNameCache -initOrigNames - = insert knownKeyNames $ - insert (map getName wiredInThings) $ - emptyModuleEnv - where - insert names env = foldl extendOrigNameCache env names +initOrigNames = foldl extendOrigNameCache emptyModuleEnv knownKeyNames \end{code} diff --git a/ghc/compiler/prelude/PrelInfo.lhs b/ghc/compiler/prelude/PrelInfo.lhs index 3e0cf4a..92c898b 100644 --- a/ghc/compiler/prelude/PrelInfo.lhs +++ b/ghc/compiler/prelude/PrelInfo.lhs @@ -40,7 +40,7 @@ import DataCon ( DataCon ) import Id ( idName ) import MkId ( mkPrimOpId, wiredInIds ) import MkId -- All of it, for re-export -import Name ( Name, nameOccName ) +import Name ( Name, nameOccName, NamedThing(..) ) import RdrName ( mkRdrUnqual, getRdrName ) import HsSyn ( HsTyVarBndr(..) ) import OccName ( mkVarOcc ) @@ -87,7 +87,8 @@ wiredInThingEnv = mkTypeEnv wiredInThings knownKeyNames :: [Name] knownKeyNames - = basicKnownKeyNames + = map getName wiredInThings + ++ basicKnownKeyNames #ifdef GHCI ++ nameSetToList templateHaskellNames #endif