summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2023-05-10 17:27:52 -0400
committerBen Gamari <ben@smart-cactus.org>2023-05-14 10:49:41 -0400
commit654a33208ec81c957c6443ddc17bd600c39f3979 (patch)
treee8419abb87afc2b1a32447d849ef3309efa79caf
parent14c7923f2273a8f1e5e7931b2fc0b938b2f639b7 (diff)
downloadhaskell-654a33208ec81c957c6443ddc17bd600c39f3979.tar.gz
base: Don't collect backtraces in onException
-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