Skip to content

Commit 07454c6

Browse files
authored
Merge pull request #692 from IntersectMBO/jdral/drop-ghc-8.10
Drop support for `ghc-8.10`
2 parents 61131aa + 3240823 commit 07454c6

File tree

11 files changed

+18
-142
lines changed

11 files changed

+18
-142
lines changed

.github/workflows/ci.yml

+1-9
Original file line numberDiff line numberDiff line change
@@ -158,24 +158,16 @@ jobs:
158158
fail-fast: false
159159
matrix:
160160
os: ["ubuntu-latest", "macOS-latest", "windows-latest"]
161-
ghc-version: ["8.10", "9.2", "9.4", "9.6", "9.8", "9.10", "9.12"]
161+
ghc-version: ["9.2", "9.4", "9.6", "9.8", "9.10", "9.12"]
162162
cabal-version: ["3.12"]
163163
# The inclusion of these default keys in the matrix ensures that any
164164
# entry under include that assigns these keys creates a new matrix entry
165165
cabal-flags: [""]
166166
cabal-project-file: [""]
167167
cabal-documentation: [false]
168168

169-
exclude:
170-
# GHC 8.10 is not supported on macOS wit ARM CPU
171-
- ghc-version: "8.10"
172-
os: "macOS-latest"
173-
174169
include:
175170
# Include builds for various special cases
176-
- name: "Build on macOS with Intel CPU and GHC 8.10"
177-
os: "macOS-13"
178-
ghc-version: "8.10"
179171
- name: "Build with +serialblockio"
180172
os: "ubuntu-latest"
181173
cabal-flags: "+serialblockio"

cabal.project.release

-5
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ constraints: bloomfilter <0
2222
-- we could add a conditional on (+serialblockio) to remove this import automatically.
2323
import: cabal.project.blockio-uring
2424

25-
-- TODO: fix assembly error in text-2.1.2
26-
if (impl(ghc < 9.0) && os(windows))
27-
package text
28-
flags: -simdutf
29-
3025
-- bugfix hGetBufExactly and hGetBufExactlyAt
3126
source-repository-package
3227
type: git

lsm-tree.cabal

+15-72
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ copyright:
208208
category: Database
209209
build-type: Simple
210210
tested-with:
211-
GHC ==8.10 || ==9.2 || ==9.4 || ==9.6 || ==9.8 || ==9.10 || ==9.12
211+
GHC ==9.2 || ==9.4 || ==9.6 || ==9.8 || ==9.10 || ==9.12
212212

213213
extra-doc-files: CHANGELOG.md
214214
extra-source-files:
@@ -239,64 +239,7 @@ common wno-x-partial
239239
ghc-options: -Wno-x-partial
240240

241241
common language
242-
-- This is at the top-level so that `cabal check` does not complain.
243-
default-language: Haskell2010
244-
245-
-- For newer GHC's, override Haskell2010 with GHC2021
246-
if impl(ghc >=9.2.1)
247-
default-language: GHC2021
248-
249-
else
250-
-- NOTE: FieldSelectors is not supported on ghc-8.10.7, so it is the only
251-
-- language extension that is missing compared to GHC2021
252-
default-extensions:
253-
BangPatterns
254-
BinaryLiterals
255-
ConstrainedClassMethods
256-
ConstraintKinds
257-
DeriveDataTypeable
258-
DeriveFoldable
259-
DeriveFunctor
260-
DeriveGeneric
261-
DeriveLift
262-
DeriveTraversable
263-
DoAndIfThenElse
264-
EmptyCase
265-
EmptyDataDecls
266-
EmptyDataDeriving
267-
ExistentialQuantification
268-
ExplicitForAll
269-
FlexibleContexts
270-
FlexibleInstances
271-
ForeignFunctionInterface
272-
GADTSyntax
273-
GeneralisedNewtypeDeriving
274-
HexFloatLiterals
275-
ImplicitPrelude
276-
ImportQualifiedPost
277-
InstanceSigs
278-
KindSignatures
279-
MonomorphismRestriction
280-
MultiParamTypeClasses
281-
NamedFieldPuns
282-
NamedWildCards
283-
NoExplicitNamespaces
284-
NumericUnderscores
285-
PatternGuards
286-
PolyKinds
287-
PostfixOperators
288-
RankNTypes
289-
RelaxedPolyRec
290-
ScopedTypeVariables
291-
StandaloneDeriving
292-
StandaloneKindSignatures
293-
StarIsType
294-
TraditionalRecordSyntax
295-
TupleSections
296-
TypeApplications
297-
TypeOperators
298-
TypeSynonymInstances
299-
242+
default-language: GHC2021
300243
default-extensions:
301244
DeriveAnyClass
302245
DerivingStrategies
@@ -382,7 +325,7 @@ library
382325
Database.LSMTree.Simple
383326

384327
build-depends:
385-
, base >=4.14 && <4.22
328+
, base >=4.16 && <4.22
386329
, bitvec ^>=1.1
387330
, bytestring ^>=0.11.4.0 || ^>=0.12.1.0
388331
, cborg ^>=0.2.10.0
@@ -454,7 +397,7 @@ library bloomfilter
454397
visibility: private
455398
hs-source-dirs: bloomfilter/src
456399
build-depends:
457-
, base >=4.5 && <5
400+
, base >=4.16 && <5
458401
, bitvec ^>=1.1.5.0
459402
, bytestring >=0.9
460403
, data-array-byte
@@ -528,7 +471,7 @@ library extras
528471
Database.LSMTree.Extras.UTxO
529472

530473
build-depends:
531-
, base >=4.14 && <4.22
474+
, base >=4.16 && <4.22
532475
, bitvec
533476
, bytestring
534477
, containers
@@ -811,7 +754,7 @@ benchmark rocksdb-bench-wp8
811754
hs-source-dirs: bench/macro
812755
main-is: rocksdb-bench-wp8.hs
813756

814-
if !((os(linux) && flag(rocksdb)) && impl(ghc >=9.2.0))
757+
if !(os(linux) && flag(rocksdb))
815758
buildable: False
816759

817760
build-depends:
@@ -836,7 +779,7 @@ library rocksdb
836779
exposed-modules: RocksDB
837780
other-modules: RocksDB.FFI
838781

839-
if !((os(linux) && flag(rocksdb)) && impl(ghc >=9.2.0))
782+
if !(os(linux) && flag(rocksdb))
840783
buildable: False
841784

842785
-- Ubuntu 22.04 doesn't have pkgconfig files for rocksdb
@@ -864,7 +807,7 @@ test-suite kmerge-test
864807
hs-source-dirs: test
865808
main-is: kmerge-test.hs
866809
build-depends:
867-
, base >=4.14 && <4.22
810+
, base >=4.16 && <4.22
868811
, deepseq
869812
, heaps
870813
, lsm-tree:kmerge
@@ -883,7 +826,7 @@ benchmark kmerge-bench
883826
main-is: kmerge-test.hs
884827
cpp-options: -DKMERGE_BENCHMARKS
885828
build-depends:
886-
, base >=4.14 && <4.22
829+
, base >=4.16 && <4.22
887830
, deepseq
888831
, heaps
889832
, lsm-tree:kmerge
@@ -901,7 +844,7 @@ test-suite map-range-test
901844
hs-source-dirs: test
902845
main-is: map-range-test.hs
903846
build-depends:
904-
, base >=4.14 && <4.22
847+
, base >=4.16 && <4.22
905848
, bytestring
906849
, containers
907850
, lsm-tree
@@ -963,7 +906,7 @@ library blockio-api
963906
System.FS.BlockIO.Serial
964907

965908
build-depends:
966-
, base >=4.14 && <4.22
909+
, base >=4.16 && <4.22
967910
, deepseq ^>=1.4 || ^>=1.5
968911
, fs-api ^>=0.3
969912
, io-classes ^>=1.6 || ^>=1.7
@@ -1004,7 +947,7 @@ test-suite blockio-api-test
1004947
main-is: Main.hs
1005948
build-depends:
1006949
, async
1007-
, base >=4.14 && <4.22
950+
, base >=4.16 && <4.22
1008951
, bytestring
1009952
, fs-api
1010953
, lsm-tree:blockio-api
@@ -1024,7 +967,7 @@ library blockio-sim
1024967
hs-source-dirs: blockio-sim/src
1025968
exposed-modules: System.FS.BlockIO.Sim
1026969
build-depends:
1027-
, base >=4.14 && <4.22
970+
, base >=4.16 && <4.22
1028971
, bytestring
1029972
, fs-api ^>=0.3
1030973
, fs-sim ^>=0.3
@@ -1039,7 +982,7 @@ test-suite blockio-sim-test
1039982
hs-source-dirs: blockio-sim/test
1040983
main-is: Main.hs
1041984
build-depends:
1042-
, base >=4.14 && <4.22
985+
, base >=4.16 && <4.22
1043986
, fs-api
1044987
, fs-sim
1045988
, io-classes:strict-stm
@@ -1068,7 +1011,7 @@ library control
10681011
Control.RefCount
10691012

10701013
build-depends:
1071-
, base >=4.14 && <4.22
1014+
, base >=4.16 && <4.22
10721015
, deepseq ^>=1.4 || ^>=1.5
10731016
, io-classes ^>=1.6 || ^>=1.7
10741017
, io-classes:strict-stm

scripts/generate-readme.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env cabal
22
{- cabal:
33
build-depends:
4-
, base >=4.12
4+
, base >=4.16
55
, bytestring >=0.11
66
, Cabal-syntax ^>=3.10 || ^>=3.12
77
, pandoc ^>=3.6.4

src-control/Control/RefCount.hs

-2
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,7 @@ releaseRef ref@Ref{refobj} = do
252252
decrementRefCounter (getRefCounter refobj)
253253

254254
{-# COMPLETE DeRef #-}
255-
#if MIN_VERSION_GLASGOW_HASKELL(9,0,0,0)
256255
{-# INLINE DeRef #-}
257-
#endif
258256
-- | Get the object in a 'Ref'. Be careful with retaining the object for too
259257
-- long, since the object must not be used after 'releaseRef' is called.
260258
--

src/Database/LSMTree/Internal/BloomFilterQuery1.hs

-24
Original file line numberDiff line numberDiff line change
@@ -42,37 +42,13 @@ type RunIx = Int
4242
--
4343
newtype RunIxKeyIx = MkRunIxKeyIx Word32
4444
deriving stock Eq
45-
#if MIN_VERSION_GLASGOW_HASKELL(9,0,0,0)
4645
deriving newtype P.Prim
47-
#else
48-
instance P.Prim RunIxKeyIx where
49-
sizeOfType# _ = 4#
50-
alignmentOfType# _ = 4#
51-
52-
indexByteArray# ba i =
53-
MkRunIxKeyIx (P.indexByteArray# ba i)
54-
readByteArray# ba i s =
55-
case P.readByteArray# ba i s of
56-
(# s', w #) -> (# s', MkRunIxKeyIx w #)
57-
writeByteArray# ba i (MkRunIxKeyIx w) s =
58-
P.writeByteArray# ba i w s
59-
60-
indexOffAddr# ba i =
61-
MkRunIxKeyIx (P.indexOffAddr# ba i)
62-
readOffAddr# ba i s =
63-
case P.readOffAddr# ba i s of
64-
(# s', w #) -> (# s', MkRunIxKeyIx w #)
65-
writeOffAddr# ba i (MkRunIxKeyIx w) s =
66-
P.writeOffAddr# ba i w s
67-
#endif
6846

6947
pattern RunIxKeyIx :: RunIx -> KeyIx -> RunIxKeyIx
7048
pattern RunIxKeyIx r k <- (unpackRunIxKeyIx -> (r, k))
7149
where
7250
RunIxKeyIx r k = packRunIxKeyIx r k
73-
#if MIN_VERSION_GLASGOW_HASKELL(9,0,0,0)
7451
{-# INLINE RunIxKeyIx #-}
75-
#endif
7652
{-# COMPLETE RunIxKeyIx #-}
7753

7854
packRunIxKeyIx :: Int -> Int -> RunIxKeyIx

src/Database/LSMTree/Internal/ByteString.hs

+1-13
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ tryGetByteArray :: BS.ByteString -> Either String (ByteArray, Int)
5454
tryGetByteArray (BS.Internal.BS (Foreign.ForeignPtr addr# contents) n) =
5555
case contents of
5656
Foreign.PlainPtr mba# ->
57-
case mutableByteArrayContentsShim# mba# `eqAddr#` addr# of
57+
case mutableByteArrayContents# mba# `eqAddr#` addr# of
5858
0# -> Left "non-zero offset into ByteArray"
5959
_ -> -- safe, ByteString's content is considered immutable
6060
Right $ case unsafeFreezeByteArray# mba# realWorld# of
@@ -63,23 +63,11 @@ tryGetByteArray (BS.Internal.BS (Foreign.ForeignPtr addr# contents) n) =
6363
Left ("unsupported MallocPtr (length " <> show n <> ")")
6464
Foreign.PlainForeignPtr {} ->
6565
Left ("unsupported PlainForeignPtr (length " <> show n <> ")")
66-
#if __GLASGOW_HASKELL__ >= 902
6766
Foreign.FinalPtr | n == 0 ->
6867
-- We can also handle empty bytestrings ('BS.empty' uses 'FinalPtr').
6968
Right (emptyByteArray, 0)
7069
Foreign.FinalPtr ->
7170
Left ("unsupported FinalPtr (length " <> show n <> ")")
72-
#endif
73-
74-
-- | Copied from the @primitive@ package
75-
mutableByteArrayContentsShim# :: MutableByteArray# s -> Addr#
76-
{-# INLINE mutableByteArrayContentsShim# #-}
77-
mutableByteArrayContentsShim# x =
78-
#if __GLASGOW_HASKELL__ >= 902
79-
mutableByteArrayContents# x
80-
#else
81-
byteArrayContents# (unsafeCoerce# x)
82-
#endif
8371

8472
-- | Copy of 'SBS.shortByteString', but with bounds (unchecked).
8573
--

src/Database/LSMTree/Internal/IncomingRun.hs

-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
{-# LANGUAGE MagicHash #-}
33
{-# LANGUAGE UnboxedTuples #-}
44

5-
#if !(MIN_VERSION_GLASGOW_HASKELL(9,0,0,0))
6-
-- Fix for ghc 8.10.x with deriving newtype Prim
7-
{-# LANGUAGE DataKinds #-}
8-
#endif
9-
105
module Database.LSMTree.Internal.IncomingRun (
116
IncomingRun (..)
127
, MergePolicyForLevel (..)

src/Database/LSMTree/Internal/MergeSchedule.hs

-5
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33
{-# LANGUAGE UnboxedTuples #-}
44
{-# OPTIONS_HADDOCK not-home #-}
55

6-
#if !(MIN_VERSION_GLASGOW_HASKELL(9,0,0,0))
7-
-- Fix for ghc 8.10.x with deriving newtype Prim
8-
{-# LANGUAGE DataKinds #-}
9-
#endif
10-
116
-- TODO: establish that this implementation matches up with the ScheduledMerges
127
-- prototype. See lsm-tree#445.
138
module Database.LSMTree.Internal.MergeSchedule (

src/Database/LSMTree/Internal/MergingRun.hs

-2
Original file line numberDiff line numberDiff line change
@@ -479,9 +479,7 @@ pattern CreditsPair :: SpentCredits -> UnspentCredits -> Int
479479
pattern CreditsPair sc uc <- (unpackCreditsPair -> (sc, uc))
480480
where
481481
CreditsPair sc uc = packCreditsPair sc uc
482-
#if MIN_VERSION_GLASGOW_HASKELL(9,2,0,0)
483482
{-# INLINE CreditsPair #-}
484-
#endif
485483
{-# COMPLETE CreditsPair #-}
486484

487485
{-# INLINE packCreditsPair #-}

xxhash/src/XXH3.hs

-4
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,7 @@ import FFI
3535

3636
{-# INLINE withFP #-}
3737
withFP :: ForeignPtr a -> (P.Ptr a -> IO b) -> IO b
38-
#if MIN_VERSION_GLASGOW_HASKELL(9,0,0,0)
3938
withFP = unsafeWithForeignPtr
40-
#else
41-
withFP = withForeignPtr
42-
#endif
4339

4440
-------------------------------------------------------------------------------
4541
-- OneShot

0 commit comments

Comments
 (0)