[commit: ghc] master: In ':show imports' take account of -XNoImplicitPrelude (c93d664)

git at git.haskell.org git at git.haskell.org
Fri Jan 3 16:14:34 UTC 2014


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

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

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

commit c93d664baa552e43c915e995663aa624bcfcd6ff
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Thu Jan 2 15:16:32 2014 +0000

    In ':show imports' take account of -XNoImplicitPrelude
    
    Fixes Trac #8640


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

c93d664baa552e43c915e995663aa624bcfcd6ff
 ghc/InteractiveUI.hs |    1 +
 1 file changed, 1 insertion(+)

diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs
index be97bc0..c007a1c 100644
--- a/ghc/InteractiveUI.hs
+++ b/ghc/InteractiveUI.hs
@@ -2229,6 +2229,7 @@ showImports = do
 
       prel_imp
         | any isPreludeImport (rem_ctx ++ trans_ctx) = []
+        | not (xopt Opt_ImplicitPrelude dflags)      = []
         | otherwise = ["import Prelude -- implicit"]
 
       trans_comment s = s ++ " -- added automatically"



More information about the ghc-commits mailing list