[commit: ghc] master: Distinguish between normal and qualified unused imports (68b59ce)
Simon Peyton Jones
simonpj at microsoft.com
Fri Feb 10 11:36:37 CET 2012
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/68b59ceeeeb6fadecb7712e414c4bdb60e4e676e
>---------------------------------------------------------------
commit 68b59ceeeeb6fadecb7712e414c4bdb60e4e676e
Author: Trevor Elliott <trevor at galois.com>
Date: Thu Feb 9 11:53:34 2012 -0800
Distinguish between normal and qualified unused imports
>---------------------------------------------------------------
compiler/rename/RnNames.lhs | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/compiler/rename/RnNames.lhs b/compiler/rename/RnNames.lhs
index b3a3f83..b1a61db 100644
--- a/compiler/rename/RnNames.lhs
+++ b/compiler/rename/RnNames.lhs
@@ -1512,7 +1512,10 @@ warnUnusedImport (L loc decl, used, unused)
<+> ptext (sLit "import") <+> pp_mod <> parens empty ]
msg2 = sep [pp_herald <+> quotes (pprWithCommas ppr unused),
text "from module" <+> quotes pp_mod <+> pp_not_used]
- pp_herald = text "The import of"
+ pp_herald = text "The" <+> pp_qual <+> text "import of"
+ pp_qual
+ | ideclQualified decl = text "qualified"
+ | otherwise = empty
pp_mod = ppr (unLoc (ideclName decl))
pp_not_used = text "is redundant"
\end{code}
More information about the Cvs-ghc
mailing list