summaryrefslogtreecommitdiff
path: root/compiler/utils
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/utils')
-rw-r--r--compiler/utils/Exception.hs3
-rw-r--r--compiler/utils/IOEnv.hs1
-rw-r--r--compiler/utils/Maybes.hs2
-rw-r--r--compiler/utils/State.hs1
-rw-r--r--compiler/utils/Stream.hs1
5 files changed, 1 insertions, 7 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'.
diff --git a/compiler/utils/IOEnv.hs b/compiler/utils/IOEnv.hs
index 804ddd8e70..4470420a64 100644
--- a/compiler/utils/IOEnv.hs
+++ b/compiler/utils/IOEnv.hs
@@ -62,7 +62,6 @@ unIOEnv (IOEnv m) = m
instance Monad (IOEnv m) where
(>>=) = thenM
(>>) = (*>)
- return = pure
fail _ = failM -- Ignore the string
#if __GLASGOW_HASKELL__ > 710
diff --git a/compiler/utils/Maybes.hs b/compiler/utils/Maybes.hs
index ac5107029b..83dc9b6864 100644
--- a/compiler/utils/Maybes.hs
+++ b/compiler/utils/Maybes.hs
@@ -17,7 +17,6 @@ module Maybes (
MaybeT(..), liftMaybeT
) where
-import Control.Applicative as A
import Control.Monad
import Control.Monad.Trans.Maybe
import Data.Maybe
@@ -84,7 +83,6 @@ instance Applicative (MaybeErr err) where
(<*>) = ap
instance Monad (MaybeErr err) where
- return = A.pure
Succeeded v >>= k = k v
Failed e >>= _ = Failed e
diff --git a/compiler/utils/State.hs b/compiler/utils/State.hs
index fb6f2c3554..8eca4657df 100644
--- a/compiler/utils/State.hs
+++ b/compiler/utils/State.hs
@@ -15,7 +15,6 @@ instance Applicative (State s) where
(# x, s'' #) -> (# f x, s'' #)
instance Monad (State s) where
- return = pure
m >>= n = State $ \s -> case runState' m s of
(# r, s' #) -> runState' (n r) s'
diff --git a/compiler/utils/Stream.hs b/compiler/utils/Stream.hs
index a347206e61..f7b21017cf 100644
--- a/compiler/utils/Stream.hs
+++ b/compiler/utils/Stream.hs
@@ -46,7 +46,6 @@ instance Monad m => Applicative (Stream m a) where
(<*>) = ap
instance Monad m => Monad (Stream m a) where
- return = pure
Stream m >>= k = Stream $ do
r <- m