diff options
author | Thomas Schilling <nominolo@googlemail.com> | 2008-09-21 08:56:47 +0000 |
---|---|---|
committer | Thomas Schilling <nominolo@googlemail.com> | 2008-09-21 08:56:47 +0000 |
commit | 67ad7f3ba7381ec815faf55be1ca6a4c6a919cb1 (patch) | |
tree | 007f32f8e39d4f6d3cfdce9fcdc1e67b919afe43 /compiler/main/ErrUtils.lhs | |
parent | ca3d9a7b9372ffe844c267c6e5034ee0313c281c (diff) | |
download | haskell-67ad7f3ba7381ec815faf55be1ca6a4c6a919cb1.tar.gz |
Generalise type of 'defaultErrorHandler' so it can be used inside a Ghc session.
Diffstat (limited to 'compiler/main/ErrUtils.lhs')
-rw-r--r-- | compiler/main/ErrUtils.lhs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/main/ErrUtils.lhs b/compiler/main/ErrUtils.lhs index a0325bf808..7f5914e904 100644 --- a/compiler/main/ErrUtils.lhs +++ b/compiler/main/ErrUtils.lhs @@ -97,11 +97,11 @@ throwErrMsg = throwDyn throwErrMsg = throw #endif -handleErrMsg :: (ErrMsg -> IO a) -> IO a -> IO a +handleErrMsg :: ExceptionMonad m => (ErrMsg -> m a) -> m a -> m a #if __GLASGOW_HASKELL__ < 609 -handleErrMsg = flip catchDyn +handleErrMsg = flip gcatchDyn #else -handleErrMsg = handle +handleErrMsg = ghandle #endif -- So we can throw these things as exceptions |