Ticket #5860: 0001-Distinguish-between-normal-and-qualified-unused-impo.patch

File 0001-Distinguish-between-normal-and-qualified-unused-impo.patch, 1.1 KB (added by elliottt, 16 months ago)

Add "qualified" to warning when appropriate

  • compiler/rename/RnNames.lhs

    From 3d4a5fa2418648b6f6c3d4c96a4ae4945ee49a2d Mon Sep 17 00:00:00 2001
    From: Trevor Elliott <trevor@galois.com>
    Date: Thu, 9 Feb 2012 11:53:34 -0800
    Subject: [PATCH] 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 b  
    15121512                                   <+> ptext (sLit "import") <+> pp_mod <> parens empty ] 
    15131513    msg2 = sep [pp_herald <+> quotes (pprWithCommas ppr unused), 
    15141514                    text "from module" <+> quotes pp_mod <+> pp_not_used] 
    1515     pp_herald   = text "The import of" 
     1515    pp_herald  = text "The" <+> pp_qual <+> text "import of" 
     1516    pp_qual 
     1517      | ideclQualified decl = text "qualified" 
     1518      | otherwise           = empty 
    15161519    pp_mod      = ppr (unLoc (ideclName decl)) 
    15171520    pp_not_used = text "is redundant" 
    15181521\end{code}