summaryrefslogtreecommitdiff
path: root/compiler/GHC/Data/IOEnv.hs
diff options
context:
space:
mode:
authorSasha Bogicevic <sasa.bogicevic@pm.me>2021-04-20 18:13:35 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-04-26 23:58:56 -0400
commitdd0a95a34657c5b6de003f7177242af990c924aa (patch)
tree7b12f93a1aac65a1072855243d3d6e08f15e79a5 /compiler/GHC/Data/IOEnv.hs
parent72c1812feecd2aff2a96b629063ba90a2f4cdb7b (diff)
downloadhaskell-dd0a95a34657c5b6de003f7177242af990c924aa.tar.gz
18000 Use GHC.IO.catchException in favor of Exception.catch
fix #18000
Diffstat (limited to 'compiler/GHC/Data/IOEnv.hs')
-rw-r--r--compiler/GHC/Data/IOEnv.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/GHC/Data/IOEnv.hs b/compiler/GHC/Data/IOEnv.hs
index 5a3c56db3f..29cd831ecb 100644
--- a/compiler/GHC/Data/IOEnv.hs
+++ b/compiler/GHC/Data/IOEnv.hs
@@ -36,6 +36,7 @@ import GHC.Prelude
import GHC.Driver.Session
import {-# SOURCE #-} GHC.Driver.Hooks
+import GHC.IO (catchException)
import GHC.Utils.Exception
import GHC.Unit.Module
import GHC.Utils.Panic
@@ -183,7 +184,7 @@ safeTry act = do
-- Fork, so that 'act' is safe from all asynchronous exceptions other than the ones we send it
t <- forkIO $ try (restore act) >>= putMVar var
restore (readMVar var)
- `catch` \(e :: SomeException) -> do
+ `catchException` \(e :: SomeException) -> do
-- Control reaches this point only if the parent thread was sent an async exception
-- In that case, kill the 'act' thread and re-raise the exception
killThread t