diff options
author | Artem Pelenitsyn <a.pelenitsyn@gmail.com> | 2020-04-25 20:12:23 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-05-04 13:19:59 -0400 |
commit | 30272412fa437ab8e7a8035db94a278e10513413 (patch) | |
tree | ff6f602e294dca766b42f8177928894d0f1ca90b /compiler/GHC/Runtime/Debugger.hs | |
parent | 0bf640b19d7a7ad0800152752a71c1dd4e6c696d (diff) | |
download | haskell-30272412fa437ab8e7a8035db94a278e10513413.tar.gz |
Remove custom ExceptionMonad class (#18075) (updating haddock submodule accordingly)
Diffstat (limited to 'compiler/GHC/Runtime/Debugger.hs')
-rw-r--r-- | compiler/GHC/Runtime/Debugger.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/GHC/Runtime/Debugger.hs b/compiler/GHC/Runtime/Debugger.hs index 7ea450067e..93869b35dd 100644 --- a/compiler/GHC/Runtime/Debugger.hs +++ b/compiler/GHC/Runtime/Debugger.hs @@ -40,6 +40,7 @@ import GHC.Driver.Session import GHC.Utils.Exception import Control.Monad +import Control.Monad.Catch as MC import Data.List ( (\\) ) import Data.Maybe import Data.IORef @@ -192,7 +193,7 @@ showTerm term = do return $ Just $ cparen (prec >= myprec && needsParens txt) (text txt) else return Nothing - `gfinally` do + `MC.finally` do setSession hsc_env GHC.setSessionDynFlags dflags cPprShowable prec NewtypeWrap{ty=new_ty,wrapped_term=t} = @@ -228,7 +229,7 @@ pprTypeAndContents id = do let depthBound = 100 -- If the value is an exception, make sure we catch it and -- show the exception, rather than propagating the exception out. - e_term <- gtry $ GHC.obtainTermFromId depthBound False id + e_term <- MC.try $ GHC.obtainTermFromId depthBound False id docs_term <- case e_term of Right term -> showTerm term Left exn -> return (text "*** Exception:" <+> |