projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
57217f6
)
Force the result of user-defined commands
author
Simon Marlow
<marlowsd@gmail.com>
Fri, 30 Jan 2009 09:19:19 +0000
(09:19 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Fri, 30 Jan 2009 09:19:19 +0000
(09:19 +0000)
so that exceptions are reported with "*** Exception" instead of as a panic.
compiler/ghci/InteractiveUI.hs
patch
|
blob
|
history
diff --git
a/compiler/ghci/InteractiveUI.hs
b/compiler/ghci/InteractiveUI.hs
index
70a602f
..
8a70787
100644
(file)
--- 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