[commit: ghc] master: Compare against pRELUDE_NAME instead of "Prelude" (6c235b5)

git at git.haskell.org git at git.haskell.org
Mon Sep 30 22:42:01 CEST 2013


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/6c235b51e345fd25c1222ab2ce0cfdea2845a02e/ghc

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

commit 6c235b51e345fd25c1222ab2ce0cfdea2845a02e
Author: Patrick Palka <patrick at parcs.ath.cx>
Date:   Mon Sep 30 15:15:42 2013 -0400

    Compare against pRELUDE_NAME instead of "Prelude"


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

6c235b51e345fd25c1222ab2ce0cfdea2845a02e
 compiler/typecheck/TcRnDriver.lhs |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/typecheck/TcRnDriver.lhs b/compiler/typecheck/TcRnDriver.lhs
index 6b502fe..de45b50 100644
--- a/compiler/typecheck/TcRnDriver.lhs
+++ b/compiler/typecheck/TcRnDriver.lhs
@@ -1005,7 +1005,7 @@ tcAmpImportViaPrelude :: Name
 tcAmpImportViaPrelude name = any importViaPrelude
   where
     isPrelude :: ImportDecl Name -> Bool
-    isPrelude = (== "Prelude") .  moduleNameString . unLoc . ideclName
+    isPrelude imp = unLoc (ideclName imp) == pRELUDE_NAME
 
     -- Implicit (Prelude) import?
     isImplicit :: ImportDecl Name -> Bool




More information about the ghc-commits mailing list