diff options
Diffstat (limited to 'compiler/utils')
-rw-r--r-- | compiler/utils/Exception.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/utils/Exception.hs b/compiler/utils/Exception.hs index db5bcad629..9d196fd843 100644 --- a/compiler/utils/Exception.hs +++ b/compiler/utils/Exception.hs @@ -7,6 +7,7 @@ module Exception where import Control.Exception +import Control.Monad.IO.Class catchIO :: IO a -> (IOException -> IO a) -> IO a catchIO = Control.Exception.catch @@ -27,7 +28,7 @@ tryIO = try -- implementations of 'gbracket' and 'gfinally' use 'gblock' and 'gunblock' -- thus rarely require overriding. -- -class Monad m => ExceptionMonad m where +class MonadIO m => ExceptionMonad m where -- | Generalised version of 'Control.Exception.catch', allowing an arbitrary -- exception handling monad instead of just 'IO'. |