summaryrefslogtreecommitdiff
path: root/compiler/utils
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2020-03-25 13:50:38 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-03-31 10:54:20 -0400
commit57b888c0e90be7189285a6b078c30b26d0923809 (patch)
tree2635fd3a7205c11b85392d3ef815e247ea7b17ec /compiler/utils
parentf024b6e385bd1448968b7bf20de05f655c815bae (diff)
downloadhaskell-57b888c0e90be7189285a6b078c30b26d0923809.tar.gz
Require GHC 8.8 as the minimum compiler for bootstrapping
This allows us to remove several bits of CPP that are either always true or no longer reachable. As an added bonus, we no longer need to worry about importing `Control.Monad.Fail.fail` qualified to avoid clashing with `Control.Monad.fail`, since the latter is now the same as the former.
Diffstat (limited to 'compiler/utils')
-rw-r--r--compiler/utils/Binary.hs4
-rw-r--r--compiler/utils/IOEnv.hs6
2 files changed, 1 insertions, 9 deletions
diff --git a/compiler/utils/Binary.hs b/compiler/utils/Binary.hs
index bedf380d29..98d4e5ad56 100644
--- a/compiler/utils/Binary.hs
+++ b/compiler/utils/Binary.hs
@@ -829,12 +829,10 @@ instance Binary RuntimeRep where
put_ bh AddrRep = putByte bh 9
put_ bh FloatRep = putByte bh 10
put_ bh DoubleRep = putByte bh 11
-#if __GLASGOW_HASKELL__ >= 807
put_ bh Int8Rep = putByte bh 12
put_ bh Word8Rep = putByte bh 13
put_ bh Int16Rep = putByte bh 14
put_ bh Word16Rep = putByte bh 15
-#endif
#if __GLASGOW_HASKELL__ >= 809
put_ bh Int32Rep = putByte bh 16
put_ bh Word32Rep = putByte bh 17
@@ -855,12 +853,10 @@ instance Binary RuntimeRep where
9 -> pure AddrRep
10 -> pure FloatRep
11 -> pure DoubleRep
-#if __GLASGOW_HASKELL__ >= 807
12 -> pure Int8Rep
13 -> pure Word8Rep
14 -> pure Int16Rep
15 -> pure Word16Rep
-#endif
#if __GLASGOW_HASKELL__ >= 809
16 -> pure Int32Rep
17 -> pure Word32Rep
diff --git a/compiler/utils/IOEnv.hs b/compiler/utils/IOEnv.hs
index fd6f6722cd..f9da146da5 100644
--- a/compiler/utils/IOEnv.hs
+++ b/compiler/utils/IOEnv.hs
@@ -43,7 +43,6 @@ import Data.IORef ( IORef, newIORef, readIORef, writeIORef, modifyIORef,
import System.IO.Unsafe ( unsafeInterleaveIO )
import System.IO ( fixIO )
import Control.Monad
-import qualified Control.Monad.Fail as MonadFail
import MonadUtils
import Control.Applicative (Alternative(..))
@@ -60,11 +59,8 @@ unIOEnv (IOEnv m) = m
instance Monad (IOEnv m) where
(>>=) = thenM
(>>) = (*>)
-#if !MIN_VERSION_base(4,13,0)
- fail = MonadFail.fail
-#endif
-instance MonadFail.MonadFail (IOEnv m) where
+instance MonadFail (IOEnv m) where
fail _ = failM -- Ignore the string
instance Applicative (IOEnv m) where