diff options
| author | simonpj <unknown> | 2003-02-06 17:11:14 +0000 |
|---|---|---|
| committer | simonpj <unknown> | 2003-02-06 17:11:14 +0000 |
| commit | e2971311b54ed42ae2a2e05076a67fb8d26fcadb (patch) | |
| tree | de985bb6c029abb7d2e126bd62ff6b75ac3b0c06 | |
| parent | 0c039fb92a48ad87a314b902efbba3bc40539e02 (diff) | |
| download | haskell-e2971311b54ed42ae2a2e05076a67fb8d26fcadb.tar.gz | |
[project @ 2003-02-06 17:11:13 by simonpj]
Minor tidy up of known-key names
| -rw-r--r-- | ghc/compiler/main/HscMain.lhs | 9 | ||||
| -rw-r--r-- | ghc/compiler/prelude/PrelInfo.lhs | 5 |
2 files changed, 5 insertions, 9 deletions
diff --git a/ghc/compiler/main/HscMain.lhs b/ghc/compiler/main/HscMain.lhs index 336e2ce8b9..d360dd9b2b 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 3e0cf4a5c1..92c898bfa4 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 |
