[commit: ghc] master: Make MonadIO a superclass of ExceptionMonad (45df026)
Ian Lynagh
igloo at earth.li
Thu Jan 31 01:29:56 CET 2013
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/45df0266679dcf8b92142809fe4c8f4fcd1871cd
>---------------------------------------------------------------
commit 45df0266679dcf8b92142809fe4c8f4fcd1871cd
Author: Ian Lynagh <ian at well-typed.com>
Date: Wed Jan 30 16:05:36 2013 +0000
Make MonadIO a superclass of ExceptionMonad
>---------------------------------------------------------------
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 db5bcad..9d196fd 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'.
More information about the ghc-commits
mailing list