diff options
author | Thomas Schilling <nominolo@googlemail.com> | 2008-09-14 17:24:04 +0000 |
---|---|---|
committer | Thomas Schilling <nominolo@googlemail.com> | 2008-09-14 17:24:04 +0000 |
commit | 73e0b2a1af83297d85ca1746f1ffe24d50339699 (patch) | |
tree | d511e7055c9d81ac76bf17a76ccc059f60804343 /compiler/utils | |
parent | 4767e535d9761920a18629a4142d3a929503b936 (diff) | |
download | haskell-73e0b2a1af83297d85ca1746f1ffe24d50339699.tar.gz |
Generalise 'handleGhcException' to work with any 'ExceptionMonad'.
Diffstat (limited to 'compiler/utils')
-rw-r--r-- | compiler/utils/Panic.lhs | 6 |
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 |