\section{Tidying up Core}
\begin{code}
+{-# OPTIONS -w #-}
+-- The above warning supression flag is a temporary kludge.
+-- While working on this module you are encouraged to remove it and fix
+-- any warnings in the module. See
+-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
+-- for details
+
module TidyPgm( mkBootModDetails, tidyProgram ) where
#include "HsVersions.h"
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 Name
import NameSet ( NameSet, elemNameSet )
import IfaceEnv ( allocateGlobalBinder )
import NameEnv ( filterNameEnv, mapNameEnv )
newTyConRep, tyConSelIds, isAlgTyCon,
isEnumerationTyCon, isOpenTyCon )
import Class ( classSelIds )
-import Module ( Module )
+import Module
import HscTypes
import Maybes ( orElse, mapCatMaybes )
import ErrUtils ( showPass, dumpIfSet_core )
-import PackageConfig ( PackageId )
import UniqSupply ( splitUniqSupply, uniqFromSupply )
import Outputable
import FastTypes hiding ( fastOr )
, md_fam_insts = fam_insts
, md_rules = []
, md_exports = exports
- , md_modBreaks = modBreaks
+ , md_vect_info = noVectInfo
})
}
where
mg_insts = insts, mg_fam_insts = fam_insts,
mg_binds = binds,
mg_rules = imp_rules,
+ mg_vect_info = vect_info,
mg_dir_imps = dir_imps, mg_deps = deps,
mg_foreign = foreign_stubs,
mg_hpc_info = hpc_info,
cg_dir_imps = dir_imps,
cg_foreign = foreign_stubs,
cg_dep_pkgs = dep_pkgs deps,
- cg_hpc_info = hpc_info },
+ cg_hpc_info = hpc_info,
+ cg_modBreaks = modBreaks },
ModDetails { md_types = tidy_type_env,
md_rules = tidy_rules,
md_insts = tidy_insts,
md_fam_insts = fam_insts,
md_exports = exports,
- md_modBreaks = modBreaks })
-
+ md_vect_info = vect_info -- is already tidy
+ })
}
lookup_dfun type_env dfun_id
global = isExternalName name
local = not global
internal = not external
- loc = nameSrcLoc name
+ loc = nameSrcSpan name
(occ_env', occ') = tidyOccName occ_env (nameOccName name)