last_command = Nothing,
cmdqueue = [],
remembered_ctx = [],
- virtual_path = cwd
+ virtual_path = cwd,
+ ghc_e = isJust maybe_exprs
}
#ifdef USE_EDITLINE
-- current progname in the exception text:
-- <progname>: <exception>
io $ withProgName (progname st)
- -- The "fast exit" part just calls exit()
- -- directly instead of doing an orderly
- -- runtime shutdown, otherwise the main
- -- GHCi thread will complain about being
- -- interrupted.
- $ topHandlerFastExit e
+ -- this used to be topHandlerFastExit, see #2228
+ $ topHandler e
runCommands' handle (return Nothing)
-- and finally, exit
flushInterpBuffers
io installSignalHandlers
b <- isOptionSet RevertCAFs
- io (when b revertCAFs)
+ when b revertCAFs
return (case run_result of GHC.RunOk _ -> True; _ -> False)
addModule :: [FilePath] -> GHCi ()
addModule files = do
- io (revertCAFs) -- always revert CAFs on load/add.
+ revertCAFs -- always revert CAFs on load/add.
files <- mapM expandPath files
targets <- mapM (\m -> io (GHC.guessTarget m Nothing)) files
session <- getSession
afterLoad :: SuccessFlag -> Session -> Bool -> ([Module],[Module]) -> GHCi ()
afterLoad ok session retain_context prev_context = do
- io (revertCAFs) -- always revert CAFs on load.
+ revertCAFs -- always revert CAFs on load.
discardTickArrays
loaded_mod_summaries <- getLoadedModules session
let loaded_mods = map GHC.ms_mod loaded_mod_summaries