summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2012-02-01 12:57:54 +0000
committerSimon Marlow <marlowsd@gmail.com>2012-02-07 13:23:56 +0000
commite46d26686034448a311f48f7e685f159af865d7c (patch)
tree203ed66eccf3e589b76e7d0c3d2ac8f1c7bb59f5 /ghc
parenta0c7808243b2e785d3365cd5146316b6cc8b0138 (diff)
downloadhaskell-e46d26686034448a311f48f7e685f159af865d7c.tar.gz
Check that imported modules actually exist (#5836)
Diffstat (limited to 'ghc')
-rw-r--r--ghc/InteractiveUI.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs
index 23eaa022ec..45bac2c9ef 100644
--- a/ghc/InteractiveUI.hs
+++ b/ghc/InteractiveUI.hs
@@ -1640,6 +1640,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