summaryrefslogtreecommitdiff
path: root/compiler/GHC/Runtime/Eval.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Runtime/Eval.hs')
-rw-r--r--compiler/GHC/Runtime/Eval.hs17
1 files changed, 11 insertions, 6 deletions
diff --git a/compiler/GHC/Runtime/Eval.hs b/compiler/GHC/Runtime/Eval.hs
index 80868c1eea..6880c2fec7 100644
--- a/compiler/GHC/Runtime/Eval.hs
+++ b/compiler/GHC/Runtime/Eval.hs
@@ -54,6 +54,7 @@ import GHC.Driver.Errors.Types ( hoistTcRnMessage )
import GHC.Driver.Env
import GHC.Driver.Session
import GHC.Driver.Ppr
+import GHC.Driver.Config
import GHC.Runtime.Eval.Types
import GHC.Runtime.Interpreter as GHCi
@@ -228,8 +229,9 @@ execStmt' stmt stmt_text ExecOptions{..} = do
status <-
withVirtualCWD $
- liftIO $
- evalStmt interp idflags' (isStep execSingleStep) (execWrap hval)
+ liftIO $ do
+ let eval_opts = initEvalOpts idflags' (isStep execSingleStep)
+ evalStmt interp eval_opts (execWrap hval)
let ic = hsc_IC hsc_env
bindings = (ic_tythings ic, ic_rn_gbl_env ic)
@@ -309,7 +311,7 @@ emptyHistory :: Int -> BoundedList History
emptyHistory size = nilBL size
handleRunStatus :: GhcMonad m
- => SingleStep -> String-> ([TyThing],GlobalRdrEnv) -> [Id]
+ => SingleStep -> String -> ([TyThing],GlobalRdrEnv) -> [Id]
-> EvalStatus_ [ForeignHValue] [HValueRef]
-> BoundedList History
-> m ExecResult
@@ -343,7 +345,8 @@ handleRunStatus step expr bindings final_ids status history
!history' = mkHistory hsc_env apStack_fhv bi `consBL` history
-- history is strict, otherwise our BoundedList is pointless.
fhv <- liftIO $ mkFinalizedHValue interp resume_ctxt
- status <- liftIO $ GHCi.resumeStmt interp dflags True fhv
+ let eval_opts = initEvalOpts dflags True
+ status <- liftIO $ GHCi.resumeStmt interp eval_opts fhv
handleRunStatus RunAndLogSteps expr bindings final_ids
status history'
| otherwise
@@ -443,7 +446,8 @@ resumeExec canLogSpan step mbCnt
setupBreakpoint hsc_env (fromJust mb_brkpt) (fromJust mbCnt)
-- When the user specified a break ignore count, set it
-- in the interpreter
- status <- liftIO $ GHCi.resumeStmt interp dflags (isStep step) fhv
+ let eval_opts = initEvalOpts dflags (isStep step)
+ status <- liftIO $ GHCi.resumeStmt interp eval_opts fhv
let prevHistoryLst = fromListBL 50 hist
hist' = case mb_brkpt of
Nothing -> prevHistoryLst
@@ -1212,7 +1216,8 @@ compileParsedExprRemote expr@(L loc _) = withSession $ \hsc_env -> do
_ -> panic "compileParsedExprRemote"
updateFixityEnv fix_env
- status <- liftIO $ evalStmt interp dflags False (EvalThis hvals_io)
+ let eval_opts = initEvalOpts dflags False
+ status <- liftIO $ evalStmt interp eval_opts (EvalThis hvals_io)
case status of
EvalComplete _ (EvalSuccess [hval]) -> return hval
EvalComplete _ (EvalException e) ->