summaryrefslogtreecommitdiff
path: root/compiler/utils/Exception.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/utils/Exception.hs')
-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 850393e359..8168992e00 100644
--- a/compiler/utils/Exception.hs
+++ b/compiler/utils/Exception.hs
@@ -6,6 +6,7 @@ module Exception
)
where
+import Control.Applicative as A
import Control.Exception
import Control.Monad.IO.Class
@@ -28,7 +29,7 @@ tryIO = try
-- implementations of 'gbracket' and 'gfinally' use 'gmask'
-- thus rarely require overriding.
--
-class MonadIO m => ExceptionMonad m where
+class (A.Applicative m, MonadIO m) => ExceptionMonad m where
-- | Generalised version of 'Control.Exception.catch', allowing an arbitrary
-- exception handling monad instead of just 'IO'.