diff options
Diffstat (limited to 'compiler/GHC/Iface/Recomp.hs')
-rw-r--r-- | compiler/GHC/Iface/Recomp.hs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/compiler/GHC/Iface/Recomp.hs b/compiler/GHC/Iface/Recomp.hs index 68103fc1f4..03223c5712 100644 --- a/compiler/GHC/Iface/Recomp.hs +++ b/compiler/GHC/Iface/Recomp.hs @@ -252,7 +252,7 @@ checkVersions hsc_env mod_summary iface where this_pkg = thisPackage (hsc_dflags hsc_env) -- This is a bit of a hack really - mod_deps :: ModuleNameEnv (ModuleName, IsBootInterface) + mod_deps :: ModuleNameEnv ModuleNameWithIsBoot mod_deps = mkModDeps (dep_mods (mi_deps iface)) -- | Check if any plugins are requesting recompilation @@ -455,7 +455,7 @@ checkDependencies hsc_env summary iface case find_res of Found _ mod | pkg == this_pkg - -> if moduleName mod `notElem` map fst prev_dep_mods ++ prev_dep_plgn + -> if moduleName mod `notElem` map gwib_mod prev_dep_mods ++ prev_dep_plgn then do traceHiDiffs $ text "imported module " <> quotes (ppr mod) <> text " not among previous dependencies" @@ -474,7 +474,9 @@ checkDependencies hsc_env summary iface where pkg = moduleUnit mod _otherwise -> return (RecompBecause reason) - old_deps = Set.fromList $ map fst $ filter (not . snd) prev_dep_mods + projectNonBootNames = map gwib_mod . filter ((== NotBoot) . gwib_isBoot) + old_deps = Set.fromList + $ projectNonBootNames prev_dep_mods isOldHomeDeps = flip Set.member old_deps checkForNewHomeDependency (L _ mname) = do let @@ -489,7 +491,7 @@ checkDependencies hsc_env summary iface then return (UpToDate, []) else do mb_result <- getFromModIface "need mi_deps for" mod $ \imported_iface -> do - let mnames = mname:(map fst $ filter (not . snd) $ + let mnames = mname:(map gwib_mod $ filter ((== NotBoot) . gwib_isBoot) $ dep_mods $ mi_deps imported_iface) case find (not . isOldHomeDeps) mnames of Nothing -> return (UpToDate, mnames) @@ -1073,7 +1075,7 @@ getOrphanHashes hsc_env mods = do sortDependencies :: Dependencies -> Dependencies sortDependencies d - = Deps { dep_mods = sortBy (compare `on` (moduleNameFS.fst)) (dep_mods d), + = Deps { dep_mods = sortBy (compare `on` (moduleNameFS . gwib_mod)) (dep_mods d), dep_pkgs = sortBy (compare `on` fst) (dep_pkgs d), dep_orphs = sortBy stableModuleCmp (dep_orphs d), dep_finsts = sortBy stableModuleCmp (dep_finsts d), |