Commit ae900605 authored by Sylvain Henry's avatar Sylvain Henry Committed by Marge Bot

Move dump_mod_map into initUnits

parent 653d17bd
......@@ -512,10 +512,14 @@ initUnits dflags = withTiming dflags
| gopt Opt_DistrustAllPackages dflags = map distrust_all read_pkg_dbs
| otherwise = read_pkg_dbs
(pkg_state, preload, insts)
<- mkUnitState dflags pkg_dbs []
return (dflags{ unitDatabases = Just read_pkg_dbs,
unitState = pkg_state,
(state, preload, insts) <- mkUnitState dflags pkg_dbs []
dumpIfSet_dyn (dflags { pprCols = 200 }) Opt_D_dump_mod_map "Mod Map"
FormatText
(pprModuleMap (moduleNameProvidersMap state))
return (dflags{ unitDatabases = Just read_pkg_dbs,
unitState = state,
homeUnitInstantiations = insts },
preload)
where
......@@ -1580,10 +1584,6 @@ mkUnitState dflags dbs preload0 = do
mod_map2 = mkUnusableModuleNameProvidersMap unusable
mod_map = Map.union mod_map1 mod_map2
dumpIfSet_dyn (dflags { pprCols = 200 }) Opt_D_dump_mod_map "Mod Map"
FormatText
(pprModuleMap mod_map)
-- Force pstate to avoid leaking the dflags passed to mkUnitState
let !pstate = UnitState
{ preloadUnits = dep_preload
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment