summaryrefslogtreecommitdiff
path: root/compiler/ghci/InteractiveUI.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/ghci/InteractiveUI.hs')
-rw-r--r--compiler/ghci/InteractiveUI.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/ghci/InteractiveUI.hs b/compiler/ghci/InteractiveUI.hs
index 70a602f16e..8a70787f7e 100644
--- a/compiler/ghci/InteractiveUI.hs
+++ b/compiler/ghci/InteractiveUI.hs
@@ -1030,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