[commit: ghc] master: Remove imv_empty from ImportedModsVal (5a86292)
git at git.haskell.org
git at git.haskell.org
Fri Nov 13 09:14:53 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/5a86292872f78da2289df1c711b407de0a0edd0d/ghc
>---------------------------------------------------------------
commit 5a86292872f78da2289df1c711b407de0a0edd0d
Author: Joachim Breitner <mail at joachim-breitner.de>
Date: Wed Nov 11 12:58:40 2015 +0100
Remove imv_empty from ImportedModsVal
it seems that this field is never used.
>---------------------------------------------------------------
5a86292872f78da2289df1c711b407de0a0edd0d
compiler/main/HscTypes.hs | 1 -
compiler/rename/RnNames.hs | 7 ++-----
compiler/typecheck/TcRnTypes.hs | 23 ++---------------------
3 files changed, 4 insertions(+), 27 deletions(-)
diff --git a/compiler/main/HscTypes.hs b/compiler/main/HscTypes.hs
index 31fe778..849c803 100644
--- a/compiler/main/HscTypes.hs
+++ b/compiler/main/HscTypes.hs
@@ -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
diff --git a/compiler/rename/RnNames.hs b/compiler/rename/RnNames.hs
index 44c7c17..8d4986e 100644
--- a/compiler/rename/RnNames.hs
+++ b/compiler/rename/RnNames.hs
@@ -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
diff --git a/compiler/typecheck/TcRnTypes.hs b/compiler/typecheck/TcRnTypes.hs
index 5c3727e..06ab9c2 100644
--- a/compiler/typecheck/TcRnTypes.hs
+++ b/compiler/typecheck/TcRnTypes.hs
@@ -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 at .
- --
- -- 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
More information about the ghc-commits
mailing list