X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fghci%2FInteractiveUI.hs;h=8a70787f7e36e39d38216cd1e1a4652ec503fe93;hb=e5a8d57c85d42007c8cc561e6d6b805c23603fc0;hp=d62b3709d96b680b7e0164f55933bae5722e8705;hpb=70f981b9dc28d94748ce91469df5bc12f0c6c60c;p=ghc-hetmet.git diff --git a/compiler/ghci/InteractiveUI.hs b/compiler/ghci/InteractiveUI.hs index d62b370..8a70787 100644 --- a/compiler/ghci/InteractiveUI.hs +++ b/compiler/ghci/InteractiveUI.hs @@ -340,8 +340,6 @@ interactiveUI srcs maybe_exprs = withTerminalReset $ do default_editor <- liftIO $ findEditor - cwd <- liftIO $ getCurrentDirectory - startGHCi (runGHCi srcs maybe_exprs) GHCiState{ progname = "", args = [], @@ -357,7 +355,6 @@ interactiveUI srcs maybe_exprs = withTerminalReset $ do last_command = Nothing, cmdqueue = [], remembered_ctx = [], - virtual_path = cwd, ghc_e = isJust maybe_exprs } @@ -1033,6 +1030,9 @@ defineMacro overwrite s = do runMacro :: GHC.HValue{-String -> IO String-} -> String -> GHCi Bool runMacro fun s = do str <- io ((unsafeCoerce# fun :: String -> IO String) s) + -- make sure we force any exceptions in the result, while we are still + -- inside the exception handler for commands: + seqList str (return ()) enqueueCommands (lines str) return False