summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2013-01-30 16:05:36 +0000
committerIan Lynagh <ian@well-typed.com>2013-01-30 17:43:45 +0000
commit45df0266679dcf8b92142809fe4c8f4fcd1871cd (patch)
tree50e80ae24fad8c8b14ac539d6ba973689bf8a8ac
parenta0c3263435a2d30c23c026dca6dd8b347ea5d263 (diff)
downloadhaskell-45df0266679dcf8b92142809fe4c8f4fcd1871cd.tar.gz
Make MonadIO a superclass of ExceptionMonad
-rw-r--r--compiler/utils/Exception.hs3
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'.