- -- Don't ditch a module that's already loaded
- -- If it isn't loaded, and together the is_boot-ness
- combine old@(_, _, _, Just _) new = old
- combine old@(_, _, old_is_boot, Nothing)
- new@(version, has_orphans, new_is_boot, _)
- = (version, has_orphans, old_is_boot && new_is_boot, Nothing)
+ combine old@(_, _, old_is_boot, cts) new
+ | maybeToBool cts || not old_is_boot = old -- Keep the old info if it's already loaded
+ -- or if it's a non-boot pending load
+ | otherwise = new -- Otherwise pick new info