projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4767e53
)
Generalise 'handleGhcException' to work with any 'ExceptionMonad'.
author
Thomas Schilling
<nominolo@googlemail.com>
Sun, 14 Sep 2008 17:24:04 +0000
(17:24 +0000)
committer
Thomas Schilling
<nominolo@googlemail.com>
Sun, 14 Sep 2008 17:24:04 +0000
(17:24 +0000)
compiler/utils/Panic.lhs
patch
|
blob
|
history
diff --git
a/compiler/utils/Panic.lhs
b/compiler/utils/Panic.lhs
index
f2e6312
..
6f7a4a8
100644
(file)
--- 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