Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : ghc-7.4

http://hackage.haskell.org/trac/ghc/changeset/7e8d0137ab58fefc1f4a9ca12344fb0414ef3f45

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

commit 7e8d0137ab58fefc1f4a9ca12344fb0414ef3f45
Author: Simon Marlow <[email protected]>
Date:   Wed Feb 1 12:57:54 2012 +0000

    Check that imported modules actually exist (#5836)
    
    MERGED from commit e46d26686034448a311f48f7e685f159af865d7c

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

 ghc/InteractiveUI.hs |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs
index 8b43dfa..139e841 100644
--- a/ghc/InteractiveUI.hs
+++ b/ghc/InteractiveUI.hs
@@ -1626,6 +1626,7 @@ remModulesFromContext as bs = do
 addImportToContext :: String -> GHCi ()
 addImportToContext str = do
   idecl <- GHC.parseImportDecl str
+  _ <- GHC.lookupModule (unLoc (ideclName idecl)) Nothing  -- #5836
   modifyGHCiState $ \st ->
      st { remembered_ctx = addNotSubsumed (IIDecl idecl) (remembered_ctx st) }
   setGHCContextFromGHCiState



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to