Skip to content
Snippets Groups Projects
Commit 512c77b2 authored by pcapriotti's avatar pcapriotti
Browse files

Respect package qualifier when validating imports in GHCi (#5979)

MERGED from commit a39a1925
parent e21fada0
No related branches found
No related tags found
No related merge requests found
...@@ -1627,7 +1627,7 @@ remModulesFromContext as bs = do ...@@ -1627,7 +1627,7 @@ remModulesFromContext as bs = do
addImportToContext :: String -> GHCi () addImportToContext :: String -> GHCi ()
addImportToContext str = do addImportToContext str = do
idecl <- GHC.parseImportDecl str idecl <- GHC.parseImportDecl str
_ <- GHC.lookupModule (unLoc (ideclName idecl)) Nothing -- #5836 _ <- GHC.lookupModule (unLoc (ideclName idecl)) (ideclPkgQual idecl) -- #5836
modifyGHCiState $ \st -> modifyGHCiState $ \st ->
st { remembered_ctx = addNotSubsumed (IIDecl idecl) (remembered_ctx st) st { remembered_ctx = addNotSubsumed (IIDecl idecl) (remembered_ctx st)
, transient_ctx = filter (not . ((IIDecl idecl) `iiSubsumes`)) , transient_ctx = filter (not . ((IIDecl idecl) `iiSubsumes`))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment