Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
ee262071
Commit
ee262071
authored
Jan 30, 2009
by
Simon Marlow
Browse files
Force the result of user-defined commands
so that exceptions are reported with "*** Exception" instead of as a panic.
parent
57217f68
Changes
1
Show whitespace changes
Inline
Side-by-side
compiler/ghci/InteractiveUI.hs
View file @
ee262071
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment