diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2021-03-05 19:13:39 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-03-09 02:46:20 -0500 |
commit | 0a709dd9876e40c19c934692415c437ac434318c (patch) | |
tree | 0ac02b3eb1d1397cf0bfa495c84b0ff2e8834bde /libraries | |
parent | bfa862503a9f8b2e8a61b9499d2cc3be789779fd (diff) | |
download | haskell-0a709dd9876e40c19c934692415c437ac434318c.tar.gz |
Require GHC 8.10 as the minimum compiler for bootstrapping
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.
Diffstat (limited to 'libraries')
-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 |
4 files changed, 6 insertions, 33 deletions
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 1e429ca054..2906cf6926 100644 --- a/libraries/ghc-heap/GHC/Exts/Heap.hs +++ b/libraries/ghc-heap/GHC/Exts/Heap.hs @@ -153,14 +153,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 |