X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FTidyPgm.lhs;h=f1564784eef860d513e4cc71ae183be51ffb5f38;hb=9bbcd77cf9b66940058dbea1827db594e8ff6d7f;hp=6b89b33fb3ed1478eef2934106779cd01b4616e4;hpb=e5f78a4a5309b598d5195aa49a0bf7a206942cea;p=ghc-hetmet.git diff --git a/compiler/main/TidyPgm.lhs b/compiler/main/TidyPgm.lhs index 6b89b33..f156478 100644 --- a/compiler/main/TidyPgm.lhs +++ b/compiler/main/TidyPgm.lhs @@ -28,11 +28,8 @@ import IdInfo {- loads of stuff -} import InstEnv ( Instance, DFunId, instanceDFunId, setInstanceDFunId ) import NewDemand ( isBottomingSig, topSig ) import BasicTypes ( Arity, isNeverActive, isNonRuleLoopBreaker ) -import Name ( Name, getOccName, nameOccName, mkInternalName, - localiseName, isExternalName, nameSrcLoc, - isWiredInName, getName - ) -import NameSet ( NameSet, elemNameSet, filterNameSet ) +import Name +import NameSet ( NameSet, elemNameSet ) import IfaceEnv ( allocateGlobalBinder ) import NameEnv ( filterNameEnv, mapNameEnv ) import OccName ( TidyOccEnv, initTidyOccEnv, tidyOccName ) @@ -287,12 +284,6 @@ tidyProgram hsc_env ; implicit_binds = getImplicitBinds type_env ; all_tidy_binds = implicit_binds ++ tidy_binds ; alg_tycons = filter isAlgTyCon (typeEnvTyCons type_env) - - ; tidy_vect_info = VectInfo - (filterNameSet (isElemId type_env) - (vectInfoCCVar vect_info)) - -- filter against `type_env', not `tidy_type_env', as we must - -- keep all implicit names } ; endPass dflags "Tidy Core" Opt_D_dump_simpl all_tidy_binds @@ -314,7 +305,7 @@ tidyProgram hsc_env md_fam_insts = fam_insts, md_exports = exports, md_modBreaks = modBreaks, - md_vect_info = tidy_vect_info + md_vect_info = vect_info -- is already tidy }) } @@ -323,11 +314,6 @@ lookup_dfun type_env dfun_id Just (AnId dfun_id') -> dfun_id' other -> pprPanic "lookup_dfun" (ppr dfun_id) -isElemId type_env name - = case lookupTypeEnv type_env name of - Just (AnId _) -> True - _ -> False - tidyTypeEnv :: Bool -> NameSet -> TypeEnv -> [CoreBind] -> TypeEnv -- The competed type environment is gotten from @@ -685,7 +671,7 @@ tidyTopName mod nc_var ext_ids occ_env id global = isExternalName name local = not global internal = not external - loc = nameSrcLoc name + loc = nameSrcSpan name (occ_env', occ') = tidyOccName occ_env (nameOccName name)