Commit 45df0266 authored by ian@well-typed.com's avatar ian@well-typed.com
Browse files

Make MonadIO a superclass of ExceptionMonad

parent a0c32634
......@@ -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'.
......
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