projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e27a63d
)
Improve the missing-import-list warning
author
Ian Lynagh
<igloo@earth.li>
Sun, 20 Jun 2010 12:43:20 +0000
(12:43 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Sun, 20 Jun 2010 12:43:20 +0000
(12:43 +0000)
compiler/rename/RnNames.lhs
patch
|
blob
|
history
diff --git
a/compiler/rename/RnNames.lhs
b/compiler/rename/RnNames.lhs
index
39ec541
..
77597d4
100644
(file)
--- a/
compiler/rename/RnNames.lhs
+++ b/
compiler/rename/RnNames.lhs
@@
-105,9
+105,15
@@
rnImportDecl this_mod implicit_prelude (L loc (ImportDecl loc_imp_mod_name mb_pk
imp_mod_name = unLoc loc_imp_mod_name
doc = ppr imp_mod_name <+> ptext (sLit "is directly imported")
imp_mod_name = unLoc loc_imp_mod_name
doc = ppr imp_mod_name <+> ptext (sLit "is directly imported")
+ let isExplicit lie = case unLoc lie of
+ IEThingAll _ -> False
+ _ -> True
case imp_details of
case imp_details of
- Just _ -> return ()
- Nothing -> unless implicit_prelude $
+ Just (False, lies)
+ | all isExplicit lies ->
+ return ()
+ _ ->
+ unless implicit_prelude $
ifOptM Opt_WarnMissingImportList (addWarn (missingImportListWarn imp_mod_name))
iface <- loadSrcInterface doc imp_mod_name want_boot mb_pkg
ifOptM Opt_WarnMissingImportList (addWarn (missingImportListWarn imp_mod_name))
iface <- loadSrcInterface doc imp_mod_name want_boot mb_pkg
@@
-1455,7
+1461,7
@@
nullModuleExport mod
missingImportListWarn :: ModuleName -> SDoc
missingImportListWarn mod
missingImportListWarn :: ModuleName -> SDoc
missingImportListWarn mod
- = ptext (sLit "The module") <+> quotes (ppr mod) <+> ptext (sLit "is missing an import list")
+ = ptext (sLit "The module") <+> quotes (ppr mod) <+> ptext (sLit "does not have an explicit import list")
moduleWarn :: ModuleName -> WarningTxt -> SDoc
moduleWarn mod (WarningTxt txt)
moduleWarn :: ModuleName -> WarningTxt -> SDoc
moduleWarn mod (WarningTxt txt)