Commit 81f020eb authored by simonmar's avatar simonmar
Browse files

[project @ 2001-11-06 11:04:16 by simonmar]

cosmetic only: reformat to 80 cols
parent 262020f9
...@@ -144,9 +144,9 @@ mkImportInfo this_mod imports ...@@ -144,9 +144,9 @@ mkImportInfo this_mod imports
-- (apart from hiding some, perhaps) -- (apart from hiding some, perhaps)
import_all_mods = [ m | ImportDecl m _ _ _ imp_list _ <- imports, import_all_mods = [ m | ImportDecl m _ _ _ imp_list _ <- imports,
import_all imp_list ] import_all imp_list ]
where where
import_all (Just (False, _)) = False -- Imports are specified explicitly import_all (Just (False, _)) = False -- Imports are spec'd explicitly
import_all other = True -- Everything is imported import_all other = True -- Everything is imported
-- mv_map groups together all the things imported and used -- mv_map groups together all the things imported and used
-- from a particular module in this package -- from a particular module in this package
...@@ -159,33 +159,41 @@ mkImportInfo this_mod imports ...@@ -159,33 +159,41 @@ mkImportInfo this_mod imports
add_item names _ = name:names add_item names _ = name:names
-- In our usage list we record -- In our usage list we record
-- a) Specifically: Detailed version info for imports from modules in this package
-- Gotten from iVSlurp plus import_all_mods
-- --
-- b) Everything: Just the module version for imports from modules in other packages -- a) Specifically: Detailed version info for imports
-- Gotten from iVSlurp plus import_all_mods -- from modules in this package Gotten from iVSlurp plus
-- import_all_mods
--
-- b) Everything: Just the module version for imports
-- from modules in other packages Gotten from iVSlurp plus
-- import_all_mods
-- --
-- c) NothingAtAll: The name only of modules, Baz, in this package that are 'below' us, -- c) NothingAtAll: The name only of modules, Baz, in
-- but which we didn't need at all (this is needed only to decide whether -- this package that are 'below' us, but which we didn't need
-- to open Baz.hi or Baz.hi-boot higher up the tree). -- at all (this is needed only to decide whether to open Baz.hi
-- This happens when a module, Foo, that we explicitly imported has -- or Baz.hi-boot higher up the tree). This happens when a
-- 'import Baz' in its interface file, recording that Baz is below -- module, Foo, that we explicitly imported has 'import Baz' in
-- Foo in the module dependency hierarchy. We want to propagate this info. -- its interface file, recording that Baz is below Foo in the
-- These modules are in a combination of HIT/PIT and iImpModInfo -- module dependency hierarchy. We want to propagate this
-- info. These modules are in a combination of HIT/PIT and
-- iImpModInfo
-- --
-- d) NothingAtAll: The name only of all orphan modules we know of (this is needed -- d) NothingAtAll: The name only of all orphan modules
-- so that anyone who imports us can find the orphan modules) -- we know of (this is needed so that anyone who imports us can
-- These modules are in a combination of HIT/PIT and iImpModInfo -- find the orphan modules) These modules are in a combination
-- of HIT/PIT and iImpModInfo
import_info0 = foldModuleEnv mk_imp_info [] pit import_info0 = foldModuleEnv mk_imp_info [] pit
import_info1 = foldModuleEnv mk_imp_info import_info0 hit import_info1 = foldModuleEnv mk_imp_info import_info0 hit
import_info = not_even_opened_imports ++ import_info1 import_info = not_even_opened_imports ++ import_info1
-- Recall that iImpModInfo describes modules that have been mentioned -- Recall that iImpModInfo describes modules that have
-- in the import lists of interfaces we have opened, but which we have -- been mentioned in the import lists of interfaces we
-- not even opened when compiling this module -- have opened, but which we have not even opened when
not_even_opened_imports = [ (mod_name, orphans, is_boot, NothingAtAll) -- compiling this module
| (mod_name, (orphans, is_boot)) <- fmToList (iImpModInfo ifaces) ] not_even_opened_imports =
[ (mod_name, orphans, is_boot, NothingAtAll)
| (mod_name, (orphans, is_boot)) <- fmToList (iImpModInfo ifaces) ]
mk_imp_info :: ModIface -> [ImportVersion Name] -> [ImportVersion Name] mk_imp_info :: ModIface -> [ImportVersion Name] -> [ImportVersion Name]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment