diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2021-03-05 19:13:39 -0500 |
---|---|---|
committer | Ryan Scott <ryan.gl.scott@gmail.com> | 2021-03-08 06:43:39 -0500 |
commit | 04a156d9101d7fc9ce14aee64899bd55773a4af3 (patch) | |
tree | 9df5615d9c65377d338b6de055a3deff0f172bf4 | |
parent | 31e265c1df948d1bcc82d08affe995fd1d1c1438 (diff) | |
download | haskell-04a156d9101d7fc9ce14aee64899bd55773a4af3.tar.gz |
Require GHC 8.10 as the minimum compiler for bootstrappingwip/require-ghc-8.10-to-bootstrap
Now that GHC 9.0.1 is released, it is time to drop support for bootstrapping
with GHC 8.8, as we only support building with the previous two major GHC
releases. As an added bonus, this allows us to remove several bits of CPP that
are either always true or no longer reachable.
-rw-r--r-- | .gitlab-ci.yml | 10 | ||||
-rw-r--r-- | compiler/GHC/CmmToAsm/X86/CodeGen.hs | 7 | ||||
-rw-r--r-- | compiler/GHC/Core/Opt/ConstantFold.hs | 7 | ||||
-rw-r--r-- | compiler/GHC/Iface/Type.hs | 6 | ||||
-rw-r--r-- | compiler/GHC/StgToCmm/Prim.hs | 6 | ||||
-rw-r--r-- | compiler/GHC/SysTools/Process.hs | 4 | ||||
-rw-r--r-- | compiler/GHC/Utils/Binary/Typeable.hs | 4 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | hadrian/hadrian.cabal | 2 | ||||
-rw-r--r-- | hadrian/src/Hadrian/Haskell/Cabal/Parse.hs | 14 | ||||
-rw-r--r-- | hadrian/stack.yaml | 6 | ||||
-rw-r--r-- | hadrian/stack.yaml.lock | 12 | ||||
-rw-r--r-- | libraries/base/GHC/Windows.hs | 11 | ||||
-rw-r--r-- | libraries/ghc-heap/GHC/Exts/Heap.hs | 7 | ||||
-rw-r--r-- | libraries/ghc-heap/GHC/Exts/Heap/Closures.hs | 7 | ||||
-rw-r--r-- | libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs | 14 | ||||
-rw-r--r-- | utils/check-api-annotations/check-api-annotations.cabal | 2 | ||||
-rw-r--r-- | utils/check-ppr/check-ppr.cabal | 2 | ||||
-rw-r--r-- | utils/ghc-cabal/ghc-cabal.cabal | 2 |
19 files changed, 32 insertions, 95 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cb4c6d4bcc..d91e3b8f76 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -485,8 +485,8 @@ validate-x86_64-darwin: tags: - x86_64-darwin variables: - GHC_VERSION: 8.8.4 - CABAL_INSTALL_VERSION: 3.0.0.0 + GHC_VERSION: 8.10.4 + CABAL_INSTALL_VERSION: 3.2.0.0 BIN_DIST_PREP_TAR_COMP: "ghc-x86_64-apple-darwin.tar.xz" MACOSX_DEPLOYMENT_TARGET: "10.7" # Only Sierra and onwards supports clock_gettime. See #12858 @@ -518,7 +518,7 @@ validate-x86_64-darwin: tags: - x86_64-darwin variables: - GHC_VERSION: 8.8.4 + GHC_VERSION: 8.10.4 MACOSX_DEPLOYMENT_TARGET: "10.7" ac_cv_func_clock_gettime: "no" LANG: "en_US.UTF-8" @@ -979,8 +979,8 @@ release-x86_64-linux-fedora27-dwarf: #FORCE_SYMLINKS: 1 LANG: "en_US.UTF-8" SPHINXBUILD: "/mingw64/bin/sphinx-build.exe" - CABAL_INSTALL_VERSION: "3.0.0.0" - GHC_VERSION: "8.8.4" + CABAL_INSTALL_VERSION: "3.2.0.0" + GHC_VERSION: "8.10.4" cache: paths: - cabal-cache diff --git a/compiler/GHC/CmmToAsm/X86/CodeGen.hs b/compiler/GHC/CmmToAsm/X86/CodeGen.hs index 36b24e8be2..60d19f43c1 100644 --- a/compiler/GHC/CmmToAsm/X86/CodeGen.hs +++ b/compiler/GHC/CmmToAsm/X86/CodeGen.hs @@ -4,13 +4,6 @@ {-# LANGUAGE NondecreasingIndentation #-} {-# LANGUAGE TupleSections #-} -#if __GLASGOW_HASKELL__ <= 808 --- GHC 8.10 deprecates this flag, but GHC 8.8 needs it --- The default iteration limit is a bit too low for the definitions --- in this module. -{-# OPTIONS_GHC -fmax-pmcheck-iterations=10000000 #-} -#endif - {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} ----------------------------------------------------------------------------- diff --git a/compiler/GHC/Core/Opt/ConstantFold.hs b/compiler/GHC/Core/Opt/ConstantFold.hs index 02a3983e92..c463bda314 100644 --- a/compiler/GHC/Core/Opt/ConstantFold.hs +++ b/compiler/GHC/Core/Opt/ConstantFold.hs @@ -23,13 +23,6 @@ ToDo: {-# OPTIONS_GHC -optc-DNON_POSIX_SOURCE -Wno-incomplete-uni-patterns #-} -#if __GLASGOW_HASKELL__ <= 808 --- GHC 8.10 deprecates this flag, but GHC 8.8 needs it --- The default iteration limit is a bit too low for the definitions --- in this module. -{-# OPTIONS_GHC -fmax-pmcheck-iterations=20000000 #-} -#endif - -- | Constant Folder module GHC.Core.Opt.ConstantFold ( primOpRules diff --git a/compiler/GHC/Iface/Type.hs b/compiler/GHC/Iface/Type.hs index 67f27410e8..7128ae5c0b 100644 --- a/compiler/GHC/Iface/Type.hs +++ b/compiler/GHC/Iface/Type.hs @@ -14,12 +14,6 @@ This module defines interface types and binders {-# LANGUAGE TupleSections #-} {-# LANGUAGE LambdaCase #-} -#if !MIN_VERSION_GLASGOW_HASKELL(8,10,0,0) -{-# OPTIONS_GHC -Wno-overlapping-patterns -Wno-incomplete-patterns #-} - -- N.B. This can be dropped once GHC 8.8 can be dropped as a - -- bootstrap compiler. -#endif - module GHC.Iface.Type ( IfExtName, IfLclName, diff --git a/compiler/GHC/StgToCmm/Prim.hs b/compiler/GHC/StgToCmm/Prim.hs index a0acdf897a..b10462a10b 100644 --- a/compiler/GHC/StgToCmm/Prim.hs +++ b/compiler/GHC/StgToCmm/Prim.hs @@ -1,12 +1,6 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE LambdaCase #-} -#if __GLASGOW_HASKELL__ <= 808 --- GHC 8.10 deprecates this flag, but GHC 8.8 needs it --- emitPrimOp is quite large -{-# OPTIONS_GHC -fmax-pmcheck-iterations=4000000 #-} -#endif - {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} ---------------------------------------------------------------------------- diff --git a/compiler/GHC/SysTools/Process.hs b/compiler/GHC/SysTools/Process.hs index df12cb4af7..f3acedffaf 100644 --- a/compiler/GHC/SysTools/Process.hs +++ b/compiler/GHC/SysTools/Process.hs @@ -37,14 +37,10 @@ import GHC.SysTools.FileCleanup -- @process >= 1.6.9.0@). enableProcessJobs :: CreateProcess -> CreateProcess #if defined(MIN_VERSION_process) -#if MIN_VERSION_process(1,6,9) enableProcessJobs opts = opts { use_process_jobs = True } #else enableProcessJobs opts = opts #endif -#else -enableProcessJobs opts = opts -#endif #if !MIN_VERSION_base(4,15,0) -- TODO: This can be dropped with GHC 8.16 diff --git a/compiler/GHC/Utils/Binary/Typeable.hs b/compiler/GHC/Utils/Binary/Typeable.hs index c5b89bf35a..735e4e3989 100644 --- a/compiler/GHC/Utils/Binary/Typeable.hs +++ b/compiler/GHC/Utils/Binary/Typeable.hs @@ -128,10 +128,8 @@ instance Binary RuntimeRep where put_ bh Word8Rep = putByte bh 13 put_ bh Int16Rep = putByte bh 14 put_ bh Word16Rep = putByte bh 15 -#if __GLASGOW_HASKELL__ >= 809 put_ bh Int32Rep = putByte bh 16 put_ bh Word32Rep = putByte bh 17 -#endif get bh = do tag <- getByte bh @@ -152,10 +150,8 @@ instance Binary RuntimeRep where 13 -> pure Word8Rep 14 -> pure Int16Rep 15 -> pure Word16Rep -#if __GLASGOW_HASKELL__ >= 809 16 -> pure Int32Rep 17 -> pure Word32Rep -#endif _ -> fail "Binary.putRuntimeRep: invalid tag" instance Binary KindRep where diff --git a/configure.ac b/configure.ac index fcf74567d3..2645ee5aa1 100644 --- a/configure.ac +++ b/configure.ac @@ -191,8 +191,8 @@ if test "$WithGhc" = "" then AC_MSG_ERROR([GHC is required.]) fi -FP_COMPARE_VERSIONS([$GhcVersion],[-lt],[8.8], - [AC_MSG_ERROR([GHC version 8.8 or later is required to compile GHC.])]) +FP_COMPARE_VERSIONS([$GhcVersion],[-lt],[8.10], + [AC_MSG_ERROR([GHC version 8.10 or later is required to compile GHC.])]) if test `expr $GhcMinVersion % 2` = "1" then diff --git a/hadrian/hadrian.cabal b/hadrian/hadrian.cabal index c82ff82428..408cdc4f37 100644 --- a/hadrian/hadrian.cabal +++ b/hadrian/hadrian.cabal @@ -134,7 +134,7 @@ executable hadrian , BangPatterns other-extensions: MultiParamTypeClasses , TypeFamilies - build-depends: Cabal >= 3.0 && < 3.5 + build-depends: Cabal >= 3.2 && < 3.5 , QuickCheck >= 2.6 && < 2.15 , base >= 4.8 && < 5 , bytestring >= 0.10 && < 0.12 diff --git a/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs b/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs index 776edb15e7..49352c6823 100644 --- a/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs +++ b/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs @@ -38,9 +38,7 @@ import qualified Distribution.Simple.PackageIndex as C import qualified Distribution.Text as C import qualified Distribution.Types.LocalBuildInfo as C import qualified Distribution.Types.MungedPackageId as C -#if MIN_VERSION_Cabal(3,2,0) import qualified Distribution.Utils.ShortText as C -#endif #if !MIN_VERSION_Cabal(3,4,0) import qualified Distribution.Types.CondTree as C #endif @@ -76,8 +74,8 @@ parsePackageData pkg = do deps = nubOrd sorted \\ [name] depPkgs = catMaybes $ map findPackageByName deps return $ PackageData name version - (shortTextToString (C.synopsis pd)) - (shortTextToString (C.description pd)) + (C.fromShortText (C.synopsis pd)) + (C.fromShortText (C.description pd)) depPkgs gpd where -- Collect an overapproximation of dependencies by ignoring conditionals @@ -87,14 +85,6 @@ parsePackageData pkg = do where f (C.CondBranch _ t mt) = collectDeps (Just t) ++ collectDeps mt -#if MIN_VERSION_Cabal(3,2,0) - shortTextToString :: C.ShortText -> String - shortTextToString = C.fromShortText -#else - shortTextToString :: String -> String - shortTextToString = id -#endif - -- | Parse the package identifier from a Cabal file. parseCabalPkgId :: FilePath -> IO String parseCabalPkgId file = C.display . C.package . C.packageDescription <$> C.readGenericPackageDescription C.silent file diff --git a/hadrian/stack.yaml b/hadrian/stack.yaml index 9147e2dc57..20ed0c7ac7 100644 --- a/hadrian/stack.yaml +++ b/hadrian/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-16.14 +resolver: lts-17.5 packages: - '.' @@ -12,7 +12,3 @@ nix: - git - ncurses - perl - -extra-deps: -- alex-3.2.6 -- happy-1.20.0 diff --git a/hadrian/stack.yaml.lock b/hadrian/stack.yaml.lock new file mode 100644 index 0000000000..1bba64b861 --- /dev/null +++ b/hadrian/stack.yaml.lock @@ -0,0 +1,12 @@ +# This file was autogenerated by Stack. +# You should not edit this file by hand. +# For more information, please see the documentation at: +# https://docs.haskellstack.org/en/stable/lock_files + +snapshots: +- original: lts-17.5 + completed: + sha256: 78e8ebabf11406261abbc95b44f240acf71802630b368888f6d758de7fc3a2f7 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/17/5.yaml + size: 565266 +packages: [] diff --git a/libraries/base/GHC/Windows.hs b/libraries/base/GHC/Windows.hs index d8f8bef804..be0c3837a9 100644 --- a/libraries/base/GHC/Windows.hs +++ b/libraries/base/GHC/Windows.hs @@ -74,7 +74,7 @@ module GHC.Windows ( nullHANDLE, ) where -import Data.Bits (shiftL, shiftR, (.|.), (.&.)) +import Data.Bits (finiteBitSize, shiftL, shiftR, (.|.), (.&.)) import Data.Char import Data.OldList import Data.Maybe @@ -93,15 +93,6 @@ import System.IO.Error import qualified Numeric -#if MIN_VERSION_base(4,7,0) -import Data.Bits (finiteBitSize) -#else -import Data.Bits (Bits, bitSize) - -finiteBitSize :: (Bits a) => a -> Int -finiteBitSize = bitSize -#endif - #include "windows_cconv.h" type BOOL = Bool diff --git a/libraries/ghc-heap/GHC/Exts/Heap.hs b/libraries/ghc-heap/GHC/Exts/Heap.hs index 10a9ea8be9..a06280b710 100644 --- a/libraries/ghc-heap/GHC/Exts/Heap.hs +++ b/libraries/ghc-heap/GHC/Exts/Heap.hs @@ -145,14 +145,7 @@ getClosureDataFromHeapObject -- ^ Heap representation of the closure. getClosureDataFromHeapObject x = do case unpackClosure# x of -#if MIN_VERSION_ghc_prim(0,5,3) (# infoTableAddr, heapRep, pointersArray #) -> do -#else - -- This is a hack to cover the bootstrap compiler using the old version - -- of 'unpackClosure'. The new 'unpackClosure' return values are not - -- merely a reordering, so using the old version would not work. - (# infoTableAddr, pointersArray, heapRep #) -> do -#endif let infoTablePtr = Ptr infoTableAddr ptrList = [case indexArray# pointersArray i of (# ptr #) -> Box ptr diff --git a/libraries/ghc-heap/GHC/Exts/Heap/Closures.hs b/libraries/ghc-heap/GHC/Exts/Heap/Closures.hs index 1a6a9371d4..3b51b22ceb 100644 --- a/libraries/ghc-heap/GHC/Exts/Heap/Closures.hs +++ b/libraries/ghc-heap/GHC/Exts/Heap/Closures.hs @@ -16,12 +16,7 @@ module GHC.Exts.Heap.Closures ( , WhyBlocked(..) , TsoFlags(..) , allClosures -#if __GLASGOW_HASKELL__ >= 809 - -- The closureSize# primop is unsupported on earlier GHC releases but we - -- build ghc-heap as a boot library so it must be buildable. Drop this once - -- we are guaranteed to bootstsrap with GHC >= 8.9. , closureSize -#endif -- * Boxes , Box(..) @@ -430,11 +425,9 @@ allClosures (WeakClosure {..}) = [cfinalizers, key, value, finalizer, link] allClosures (OtherClosure {..}) = hvalues allClosures _ = [] -#if __GLASGOW_HASKELL__ >= 809 -- | Get the size of the top-level closure in words. -- Includes header and payload. Does not follow pointers. -- -- @since 8.10.1 closureSize :: Box -> Int closureSize (Box x) = I# (closureSize# x) -#endif diff --git a/libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs b/libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs index 67017d4926..a41d0a47b3 100644 --- a/libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs +++ b/libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs @@ -1,4 +1,5 @@ {-# LANGUAGE PolyKinds #-} +{-# LANGUAGE StandaloneKindSignatures #-} {-# LANGUAGE Trustworthy #-} -- | @@ -29,17 +30,12 @@ import Prelude -- * Type synonyms ---------------------------------------------------------- --- Since GHC 8.8 is currently the minimum boot compiler version that we must --- support, we must use inline kind signatures to make TExpQ and CodeQ --- levity polymorphic. When we drop support for GHC 8.8, we can instead use --- standalone kind signatures, which are provided as comments. - -- | Levity-polymorphic since /template-haskell-2.17.0.0/. --- type TExpQ :: TYPE r -> Kind.Type -type TExpQ (a :: TYPE r) = Q (TExp a) +type TExpQ :: TYPE r -> Kind.Type +type TExpQ a = Q (TExp a) --- type CodeQ :: TYPE r -> Kind.Type -type CodeQ = Code Q :: (TYPE r -> Kind.Type) +type CodeQ :: TYPE r -> Kind.Type +type CodeQ = Code Q type InfoQ = Q Info type PatQ = Q Pat diff --git a/utils/check-api-annotations/check-api-annotations.cabal b/utils/check-api-annotations/check-api-annotations.cabal index 8bf0fb6922..dbaa25fd48 100644 --- a/utils/check-api-annotations/check-api-annotations.cabal +++ b/utils/check-api-annotations/check-api-annotations.cabal @@ -24,6 +24,6 @@ Executable check-api-annotations Build-Depends: base >= 4 && < 5, containers, - Cabal >= 3.0 && < 3.6, + Cabal >= 3.2 && < 3.6, directory, ghc diff --git a/utils/check-ppr/check-ppr.cabal b/utils/check-ppr/check-ppr.cabal index 059a4d364c..c9ff366786 100644 --- a/utils/check-ppr/check-ppr.cabal +++ b/utils/check-ppr/check-ppr.cabal @@ -25,7 +25,7 @@ Executable check-ppr Build-Depends: base >= 4 && < 5, bytestring, containers, - Cabal >= 3.0 && < 3.6, + Cabal >= 3.2 && < 3.6, directory, filepath, ghc diff --git a/utils/ghc-cabal/ghc-cabal.cabal b/utils/ghc-cabal/ghc-cabal.cabal index 5914c192e6..e00a812f32 100644 --- a/utils/ghc-cabal/ghc-cabal.cabal +++ b/utils/ghc-cabal/ghc-cabal.cabal @@ -21,6 +21,6 @@ Executable ghc-cabal Build-Depends: base >= 3 && < 5, bytestring >= 0.10 && < 0.11, - Cabal >= 3.0 && < 3.6, + Cabal >= 3.2 && < 3.6, directory >= 1.1 && < 1.4, filepath >= 1.2 && < 1.5 |