Commit 5a862928 authored by Joachim Breitner's avatar Joachim Breitner

Remove imv_empty from ImportedModsVal

it seems that this field is never used.
parent b8d263dc
......@@ -1033,7 +1033,6 @@ type ImportedMods = ModuleEnv [ImportedModsVal]
data ImportedModsVal
= ImportedModsVal {
imv_name :: ModuleName, -- ^ The name the module is imported with
imv_empty :: Bool, -- ^ whether it is an "import Foo ()" import
imv_span :: SrcSpan, -- ^ the source span of the whole import
imv_is_safe :: IsSafeImport, -- ^ whether this is a safe import
imv_is_hiding :: Bool, -- ^ whether this is an "hiding" import
......
......@@ -270,10 +270,8 @@ rnImportDecl this_mod
let gbl_env = mkGlobalRdrEnv gres
-- import_all == True <=> import M ()
(is_hiding, import_all) = case imp_details of
Just (is_hiding, L _ ls) -> (is_hiding, not is_hiding && null ls)
_ -> (False, False)
is_hiding | Just (True,_) <- imp_details = True
| otherwise = False
-- should the import be safe?
mod_safe' = mod_safe
......@@ -282,7 +280,6 @@ rnImportDecl this_mod
let imv = ImportedModsVal
{ imv_name = qual_mod_name
, imv_empty = import_all
, imv_span = loc
, imv_is_safe = mod_safe'
, imv_is_hiding = is_hiding
......
......@@ -969,27 +969,8 @@ data ImportAvails
-- = ModuleEnv [ImportedModsVal],
-- ^ Domain is all directly-imported modules
--
-- 'imv_name' is what the module was imported as, e.g. in
-- @
-- import Foo as Bar
-- @
-- it is @Bar@.
--
-- The first 'Bool' means:
--
-- - @True@ => import was @import Foo ()@
--
-- - @False@ => import was some other form
--
-- Used
--
-- (a) to help construct the usage information in the interface
-- file; if we import something we need to recompile if the
-- export version changes
--
-- (b) to specify what child modules to initialise
--
-- The second 'Bool' means that the module is safe (see rnImportDecl)
-- See the documentaion on ImportedModsVal in HscTypes for the
-- meaning of the fields.
--
-- We need a full ModuleEnv rather than a ModuleNameEnv here,
-- because we might be importing modules of the same name from
......
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