diff options
Diffstat (limited to 'ghc/InteractiveUI.hs')
-rw-r--r-- | ghc/InteractiveUI.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs index ec7e5225df..5b3e572650 100644 --- a/ghc/InteractiveUI.hs +++ b/ghc/InteractiveUI.hs @@ -2944,7 +2944,8 @@ showException se = -- may never be delivered. Thanks to Marcin for pointing out the bug. ghciHandle :: ExceptionMonad m => (SomeException -> m a) -> m a -> m a -ghciHandle h m = gcatch m $ \e -> gunblock (h e) +ghciHandle h m = gmask $ \restore -> + gcatch (restore m) $ \e -> restore (h e) ghciTry :: GHCi a -> GHCi (Either SomeException a) ghciTry (GHCi m) = GHCi $ \s -> gtry (m s) |