Commit 73e0b2a1 authored by Thomas Schilling's avatar Thomas Schilling
Browse files

Generalise 'handleGhcException' to work with any 'ExceptionMonad'.

parent 4767e535
...@@ -136,11 +136,11 @@ throwGhcException = Exception.throwDyn ...@@ -136,11 +136,11 @@ throwGhcException = Exception.throwDyn
throwGhcException = Exception.throw throwGhcException = Exception.throw
#endif #endif
handleGhcException :: (GhcException -> IO a) -> IO a -> IO a handleGhcException :: ExceptionMonad m => (GhcException -> m a) -> m a -> m a
#if __GLASGOW_HASKELL__ < 609 #if __GLASGOW_HASKELL__ < 609
handleGhcException = flip Exception.catchDyn handleGhcException = flip gcatchDyn
#else #else
handleGhcException = Exception.handle handleGhcException = ghandle
#endif #endif
ghcExceptionTc :: TyCon ghcExceptionTc :: TyCon
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment