Re: [GHC] #5860: Ambiguity between redundant imports
#5860: Ambiguity between redundant imports ---+ Reporter: elliottt | Owner: Type: feature request | Status: closed Priority: normal| Milestone: Component: Compiler |Version: 7.4.1 Resolution: fixed | Keywords: module system Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Difficulty: Unknown Testcase:| Blockedby: Blocking:|Related: ---+ Changes (by simonpj): * status: new = closed * resolution: = fixed Comment: A patch is irresistable. I buy: {{{ commit 68b59cb6fadecb7712e414c4bdb60e4e676e Author: Trevor Elliott tre...@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 }}} Thanks. Simon -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5860#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #5860: Ambiguity between redundant imports
#5860: Ambiguity between redundant imports ---+ Reporter: elliottt | Owner: Type: feature request | Status: closed Priority: normal| Milestone: Component: Compiler |Version: 7.4.1 Resolution: invalid | Keywords: module system Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Difficulty: Unknown Testcase:| Blockedby: Blocking:|Related: ---+ Changes (by simonpj): * status: new = closed * difficulty: = Unknown * resolution: = invalid Comment: Looks ok to me. The error message points to line 4, and the import of `Data.ByteString` on that line is indeed redundant. I suppose we could say The qualified import of ..., but I'm inclined to let this lie. Reopen if you disagree. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5860#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #5860: Ambiguity between redundant imports
#5860: Ambiguity between redundant imports ---+ Reporter: elliottt | Owner: Type: feature request | Status: new Priority: normal| Milestone: Component: Compiler |Version: 7.4.1 Resolution:| Keywords: module system Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Difficulty: Unknown Testcase:| Blockedby: Blocking:|Related: ---+ Changes (by elliottt): * status: closed = new * resolution: invalid = Comment: I can live with things the way they are, but I've attached a patch just in case that changes your mind :) -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5860#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs