summaryrefslogtreecommitdiff
path: root/compiler/utils/Exception.hs
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2015-12-31 16:42:38 +0100
committerHerbert Valerio Riedel <hvr@gnu.org>2015-12-31 22:38:52 +0100
commit3c8cb7f43c89e9a2b754adc5e639985f0b95b1f1 (patch)
tree7c027a215ed2b15fd66ce99ca533cc9348df745e /compiler/utils/Exception.hs
parent2f923ce2ab8bad6d01645c735c81bbf1b9ff1e05 (diff)
downloadhaskell-3c8cb7f43c89e9a2b754adc5e639985f0b95b1f1.tar.gz
Remove some redundant definitions/constraints
Starting with GHC 7.10 and base-4.8, `Monad` implies `Applicative`, which allows to simplify some definitions to exploit the superclass relationship. This a first refactoring to that end.
Diffstat (limited to 'compiler/utils/Exception.hs')
-rw-r--r--compiler/utils/Exception.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/utils/Exception.hs b/compiler/utils/Exception.hs
index 8168992e00..850393e359 100644
--- a/compiler/utils/Exception.hs
+++ b/compiler/utils/Exception.hs
@@ -6,7 +6,6 @@ module Exception
)
where
-import Control.Applicative as A
import Control.Exception
import Control.Monad.IO.Class
@@ -29,7 +28,7 @@ tryIO = try
-- implementations of 'gbracket' and 'gfinally' use 'gmask'
-- thus rarely require overriding.
--
-class (A.Applicative m, MonadIO 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'.