summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libraries/base/GHC/IO.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/libraries/base/GHC/IO.hs b/libraries/base/GHC/IO.hs
index b693aafe88..6da7367c27 100644
--- a/libraries/base/GHC/IO.hs
+++ b/libraries/base/GHC/IO.hs
@@ -350,8 +350,9 @@ getMaskingState = IO $ \s ->
_ -> MaskedInterruptible #)
onException :: IO a -> IO b -> IO a
-onException io what = io `catchException` \e -> do _ <- what
- throwIO (e :: SomeException)
+onException io what = io `catchException` \e -> do
+ _ <- what
+ throwIO $ NoBacktrace (e :: SomeException)
-- | Executes an IO computation with asynchronous
-- exceptions /masked/. That is, any thread which attempts to raise