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
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
......
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