- where is_stable new_summary
- = isJust (findModuleLinkable_maybe valid_lis (name_of_summary new_summary))
+ -- now we check for valid linkables: each module in the SCC must
+ -- have a valid linkable (see getValidLinkables above), and the
+ -- newest linkable must be the same as the previous linkable for
+ -- this module (if one exists).
+ has_valid_linkable new_summary
+ = case findModuleLinkable_maybe valid_lis modname of
+ Nothing -> False
+ Just l -> case findModuleLinkable_maybe old_lis modname of
+ Nothing -> True
+ Just m -> linkableTime l == linkableTime m
+ where modname = name_of_summary new_summary
+
+ scc_is_stable = all_imports_in_scc_or_stable
+ && all has_valid_linkable scc
+
+ if scc_is_stable
+ then preUpsweep valid_lis old_lis all_home_mods
+ (scc_names++stable) sccs
+ else preUpsweep valid_lis old_lis all_home_mods
+ stable sccs
+
+ where