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 a095ec84d2..757bebac93 100644 --- a/compiler/iface/MkIface.hs +++ b/compiler/iface/MkIface.hs @@ -1334,20 +1334,9 @@ checkDependencies hsc_env summary iface find_res <- liftIO $ findImportedModule hsc_env mod (fmap sl_fs 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" @@ -1355,7 +1344,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) <> @@ -1364,6 +1353,7 @@ checkDependencies hsc_env summary iface else return UpToDate where pkg = modulePackageKey mod + _otherwise -> return (RecompBecause reason) needInterface :: Module -> (ModIface -> IfG RecompileRequired) -> IfG RecompileRequired |
