From 73e0b2a1af83297d85ca1746f1ffe24d50339699 Mon Sep 17 00:00:00 2001 From: Thomas Schilling Date: Sun, 14 Sep 2008 17:24:04 +0000 Subject: [PATCH] Generalise 'handleGhcException' to work with any 'ExceptionMonad'. --- compiler/utils/Panic.lhs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/utils/Panic.lhs b/compiler/utils/Panic.lhs index f2e6312..6f7a4a8 100644 --- a/compiler/utils/Panic.lhs +++ b/compiler/utils/Panic.lhs @@ -136,11 +136,11 @@ throwGhcException = Exception.throwDyn throwGhcException = Exception.throw #endif -handleGhcException :: (GhcException -> IO a) -> IO a -> IO a +handleGhcException :: ExceptionMonad m => (GhcException -> m a) -> m a -> m a #if __GLASGOW_HASKELL__ < 609 -handleGhcException = flip Exception.catchDyn +handleGhcException = flip gcatchDyn #else -handleGhcException = Exception.handle +handleGhcException = ghandle #endif ghcExceptionTc :: TyCon -- 1.7.10.4