summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrevor Elliott <trevor@galois.com>2012-02-09 11:53:34 -0800
committerSimon Peyton Jones <simonpj@microsoft.com>2012-02-10 08:45:56 +0000
commit68b59ceeeeb6fadecb7712e414c4bdb60e4e676e (patch)
tree5a38d4e390ccd0163d65cf9ff60cd45017b57c3f
parent76e72c38d3c6522c3db4215e56704dd5bf3f595e (diff)
downloadhaskell-68b59ceeeeb6fadecb7712e414c4bdb60e4e676e.tar.gz
Distinguish between normal and qualified unused imports
-rw-r--r--compiler/rename/RnNames.lhs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rename/RnNames.lhs b/compiler/rename/RnNames.lhs
index b3a3f8347a..b1a61db2a2 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}