diff options
author | Paolo Capriotti <p.capriotti@gmail.com> | 2012-06-25 13:45:03 +0100 |
---|---|---|
committer | Paolo Capriotti <p.capriotti@gmail.com> | 2012-06-25 13:45:53 +0100 |
commit | 0753cf09d5ef990ca620632409a1db18a75563fa (patch) | |
tree | 61522732aba2ed88fd56091fdb94a7d0e9b8f5e4 /ghc | |
parent | 550f8b5d83529868e074a774cf059e9ce1f040d5 (diff) | |
download | haskell-0753cf09d5ef990ca620632409a1db18a75563fa.tar.gz |
New version of the patch for #5461.
Diffstat (limited to 'ghc')
-rw-r--r-- | ghc/InteractiveUI.hs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs index 32316341e1..d9d6bc235e 100644 --- a/ghc/InteractiveUI.hs +++ b/ghc/InteractiveUI.hs @@ -21,12 +21,14 @@ import Debugger -- The GHC interface import DynFlags +import GhcMonad ( modifySession ) import qualified GHC import GHC ( LoadHowMuch(..), Target(..), TargetId(..), InteractiveImport(..), TyThing(..), Phase, BreakIndex, Resume, SingleStep, Ghc, handleSourceError ) import HsImpExp -import HscTypes ( tyThingParent_maybe, handleFlagWarnings, getSafeMode, dep_pkgs ) +import HscTypes ( tyThingParent_maybe, handleFlagWarnings, getSafeMode, dep_pkgs, hsc_IC, + setInteractivePrintName ) import Module import Name import Packages ( trusted, getPackageDetails, exposed, exposedModules, pkgIdMap ) @@ -615,8 +617,8 @@ installInteractivePrint Nothing _ = return () installInteractivePrint (Just ipFun) exprmode = do ok <- trySuccess $ do (name:_) <- GHC.parseName ipFun - dflags <- getDynFlags - GHC.setInteractiveDynFlags (setInteractivePrintName name dflags) + modifySession (\he -> let new_ic = setInteractivePrintName (hsc_IC he) name + in he{hsc_IC = new_ic}) return Succeeded when (failed ok && exprmode) $ liftIO (exitWith (ExitFailure 1)) |