Commit 3b528914 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Merge branch 'master' of http://darcs.haskell.org/ghc

parents ebd7226a 7679603b
......@@ -1234,7 +1234,7 @@ distclean : clean
$(call removeFiles,libraries/process/include/HsProcessConfig.h)
$(call removeFiles,libraries/unix/include/HsUnixConfig.h)
$(call removeFiles,libraries/old-time/include/HsTimeConfig.h)
$(call removeTrees,utils/ghc-pwd/dist)
$(call removeTrees,utils/ghc-pwd/dist-boot)
$(call removeTrees,inplace)
$(call removeTrees,$(patsubst %, libraries/%/autom4te.cache, $(PACKAGES_STAGE1) $(PACKAGES_STAGE2)))
......
......@@ -1720,12 +1720,11 @@ setGHCContextFromGHCiState = do
-- the actual exception thrown by checkAdd, using tryBool to
-- turn it into a Bool.
iidecls <- filterM (tryBool.checkAdd) (transient_ctx st ++ remembered_ctx st)
GHC.setContext (maybeAddPrelude iidecls)
where
maybeAddPrelude :: [InteractiveImport] -> [InteractiveImport]
maybeAddPrelude iidecls
| any isPreludeImport iidecls = iidecls
| otherwise = iidecls ++ [implicitPreludeImport]
dflags <- GHC.getSessionDynFlags
GHC.setContext $
if xopt Opt_ImplicitPrelude dflags && not (any isPreludeImport iidecls)
then iidecls ++ [implicitPreludeImport]
else iidecls
-- XXX put prel at the end, so that guessCurrentModule doesn't pick it up.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment