[commit: ghc] master: Use ideclImplicit to filter out only *implict* Prelude imports (Trac #7963) (4c01e10)

Simon Peyton Jones simonpj at microsoft.com
Tue Jun 18 09:35:02 CEST 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : master

https://github.com/ghc/ghc/commit/4c01e105a75776b31a4507102d00856d9239390e

>---------------------------------------------------------------

commit 4c01e105a75776b31a4507102d00856d9239390e
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Mon Jun 17 22:39:43 2013 +0100

    Use ideclImplicit to filter out only *implict* Prelude imports (Trac #7963)
    
    The ideclImplicit flag didn't exist before, but it does now,
    and it makes this code simpler and makes it easy to fix Trac #7963.

>---------------------------------------------------------------

 compiler/rename/RnNames.lhs | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/compiler/rename/RnNames.lhs b/compiler/rename/RnNames.lhs
index 83aad51..4e5672b 100644
--- a/compiler/rename/RnNames.lhs
+++ b/compiler/rename/RnNames.lhs
@@ -1318,12 +1318,9 @@ warnUnusedImportDecls gbl_env
        ; whenGOptM Opt_D_dump_minimal_imports $
          printMinimalImports usage }
   where
-    explicit_import (L _ decl) = unLoc (ideclName decl) /= pRELUDE_NAME
+    explicit_import (L _ decl) = not (ideclImplicit decl)
         -- Filter out the implicit Prelude import
         -- which we do not want to bleat about
-        -- This also filters out an *explicit* Prelude import
-        -- but solving that problem involves more plumbing, and
-        -- it just doesn't seem worth it
 \end{code}
 
 





More information about the ghc-commits mailing list