diff options
Diffstat (limited to 'compiler/iface/MkIface.hs')
-rw-r--r-- | compiler/iface/MkIface.hs | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/compiler/iface/MkIface.hs b/compiler/iface/MkIface.hs index e897daa3b6..c1a9d2523f 100644 --- a/compiler/iface/MkIface.hs +++ b/compiler/iface/MkIface.hs @@ -1335,20 +1335,9 @@ checkDependencies hsc_env summary iface find_res <- liftIO $ findImportedModule hsc_env mod (fmap snd pkg) let reason = moduleNameString mod ++ " changed" case find_res of - FoundModule h -> check_mod reason (fr_mod h) - FoundSigs hs _backing -> check_mods reason (map fr_mod hs) - _otherwise -> return (RecompBecause reason) - - check_mods _ [] = return UpToDate - check_mods reason (m:ms) = do - r <- check_mod reason m - case r of - UpToDate -> check_mods reason ms - _otherwise -> return r - - check_mod reason mod + Found _ mod | pkg == this_pkg - = if moduleName mod `notElem` map fst prev_dep_mods + -> if moduleName mod `notElem` map fst prev_dep_mods then do traceHiDiffs $ text "imported module " <> quotes (ppr mod) <> text " not among previous dependencies" @@ -1356,7 +1345,7 @@ checkDependencies hsc_env summary iface else return UpToDate | otherwise - = if pkg `notElem` (map fst prev_dep_pkgs) + -> if pkg `notElem` (map fst prev_dep_pkgs) then do traceHiDiffs $ text "imported module " <> quotes (ppr mod) <> text " is from package " <> quotes (ppr pkg) <> @@ -1365,6 +1354,7 @@ checkDependencies hsc_env summary iface else return UpToDate where pkg = modulePackageKey mod + _otherwise -> return (RecompBecause reason) needInterface :: Module -> (ModIface -> IfG RecompileRequired) -> IfG RecompileRequired |