summaryrefslogtreecommitdiff
path: root/compiler/utils
diff options
context:
space:
mode:
authorThomas Schilling <nominolo@googlemail.com>2008-09-14 17:24:04 +0000
committerThomas Schilling <nominolo@googlemail.com>2008-09-14 17:24:04 +0000
commit73e0b2a1af83297d85ca1746f1ffe24d50339699 (patch)
treed511e7055c9d81ac76bf17a76ccc059f60804343 /compiler/utils
parent4767e535d9761920a18629a4142d3a929503b936 (diff)
downloadhaskell-73e0b2a1af83297d85ca1746f1ffe24d50339699.tar.gz
Generalise 'handleGhcException' to work with any 'ExceptionMonad'.
Diffstat (limited to 'compiler/utils')
-rw-r--r--compiler/utils/Panic.lhs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/utils/Panic.lhs b/compiler/utils/Panic.lhs
index f2e63129b4..6f7a4a8018 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