From: simonmar Date: Thu, 7 Jun 2001 14:15:22 +0000 (+0000) Subject: [project @ 2001-06-07 14:15:22 by simonmar] X-Git-Tag: Approximately_9120_patches~1787 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=dea3256b2af579e9f2d8b119a45d684094a1f9c5;p=ghc-hetmet.git [project @ 2001-06-07 14:15:22 by simonmar] Don't force a module's {-# SOURCE #-} imports to have object linkables in order for the current module's object linkable to be considered valid (fixes some unnecessary recompilation with recursive modules). --- diff --git a/ghc/compiler/compMan/CompManager.lhs b/ghc/compiler/compMan/CompManager.lhs index 6c1439b..56d8325 100644 --- a/ghc/compiler/compMan/CompManager.lhs +++ b/ghc/compiler/compMan/CompManager.lhs @@ -392,7 +392,7 @@ cmLoadModule cmstate1 rootname mg2_with_srcimps -- when (verb >= 2) $ -- putStrLn (showSDoc (text "Valid linkables:" - -- <+> ppr valid_linkables)) + -- <+> ppr valid_linkables)) -- Figure out a stable set of modules which can be retained -- the top level envs, to avoid upsweeping them. Goes to a @@ -575,7 +575,10 @@ getValidLinkablesSCC old_linkables all_home_mods new_linkables scc0 scc = flattenSCC scc0 scc_names = map name_of_summary scc home_module m = m `elem` all_home_mods && m `notElem` scc_names - scc_allhomeimps = nub (filter home_module (concatMap ms_allimps scc)) + scc_allhomeimps = nub (filter home_module (concatMap ms_imps scc)) + -- NOTE: ms_imps, not ms_allimps above. We don't want to + -- force a module's SOURCE imports to be already compiled for + -- its object linkable to be valid. has_object m = case findModuleLinkable_maybe new_linkables m of Nothing -> False @@ -641,7 +644,6 @@ getValidLinkable old_linkables objects_allowed new_linkables summary return (valid_linkable ++ new_linkables) - maybe_getFileLinkable :: ModuleName -> FilePath -> IO (Maybe Linkable) maybe_getFileLinkable mod_name obj_fn = do obj_exist <- doesFileExist obj_fn