diff options
author | Ben Gamari <ben@smart-cactus.org> | 2023-05-10 17:27:52 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2023-05-14 10:49:41 -0400 |
commit | 654a33208ec81c957c6443ddc17bd600c39f3979 (patch) | |
tree | e8419abb87afc2b1a32447d849ef3309efa79caf | |
parent | 14c7923f2273a8f1e5e7931b2fc0b938b2f639b7 (diff) | |
download | haskell-654a33208ec81c957c6443ddc17bd600c39f3979.tar.gz |
base: Don't collect backtraces in onException
-rw-r--r-- | libraries/base/GHC/IO.hs | 5 |
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 |