Skip to content

Commit 3f33542

Browse files
committed
Drop support for GHC<8.8
It's already 6 years old, it's version shipped by Debian oldoldstable so it provides quite generous supported version range. - Drop old GHC from CI build matrix - Bump dependency on deepseq to >=1.4.3 (version shipped with GHC 8.2) - Drop outdated conditional compilation and cabal checks. At this point we have only #if MIN_VERSION cabal checks!
1 parent 1cf44fb commit 3f33542

File tree

14 files changed

+14
-129
lines changed

14 files changed

+14
-129
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ jobs:
1818
matrix:
1919
include:
2020
# Linux
21-
- { cabal: "3.14", os: ubuntu-24.04, ghc: "8.0.2" }
22-
- { cabal: "3.14", os: ubuntu-24.04, ghc: "8.2.2" }
23-
- { cabal: "3.14", os: ubuntu-24.04, ghc: "8.4.4" }
24-
- { cabal: "3.14", os: ubuntu-24.04, ghc: "8.6.5" }
2521
- { cabal: "3.14", os: ubuntu-24.04, ghc: "8.8.4" }
2622
- { cabal: "3.14", os: ubuntu-24.04, ghc: "8.10.7" }
2723
- { cabal: "3.14", os: ubuntu-24.04, ghc: "9.0.2" }
@@ -34,15 +30,11 @@ jobs:
3430
- { cabal: "3.14", os: ubuntu-24.04, ghc: "9.10.2" }
3531
- { cabal: "3.14", os: ubuntu-24.04, ghc: "9.12.2" }
3632
# Win
37-
- { cabal: "3.14", os: windows-latest, ghc: "8.4.4" }
3833
- { cabal: "3.14", os: windows-latest, ghc: "9.6.7" }
3934
- { cabal: "3.14", os: windows-latest, ghc: "9.8.4" }
4035
- { cabal: "3.14", os: windows-latest, ghc: "9.10.2" }
4136
- { cabal: "3.14", os: windows-latest, ghc: "9.12.2" }
42-
# Too flaky:
43-
# - { cabal: "3.6", os: windows-latest, ghc: "9.0.1" }
4437
# MacOS
45-
- { cabal: "3.14", os: macOS-13, ghc: "8.4.4" }
4638
# Fails with linker errors
4739
# > ld: warning: -single_module is obsolete
4840
# > <command line>: can't load framework: Security (not found)

vector-stream/src/Data/Stream/Monadic.hs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,24 +1555,11 @@ enumFromTo_double :: (Monad m, Ord a, RealFrac a) => a -> a -> Stream m a
15551555
enumFromTo_double n m = n `seq` m `seq` Stream step ini
15561556
where
15571557
lim = m + 1/2 -- important to float out
1558-
1559-
-- GHC changed definition of Enum for Double in GHC8.6 so we have to
1560-
-- accommodate both definitions in order to preserve validity of
1561-
-- rewrite rule
1562-
--
1563-
-- ISSUE: https://gitlab.haskell.org/ghc/ghc/issues/15081
1564-
-- COMMIT: https://gitlab.haskell.org/ghc/ghc/commit/4ffaf4b67773af4c72d92bb8b6c87b1a7d34ac0f
1565-
#if MIN_VERSION_base(4,12,0)
15661558
ini = 0
15671559
step x | x' <= lim = return $ Yield x' (x+1)
15681560
| otherwise = return $ Done
15691561
where
15701562
x' = x + n
1571-
#else
1572-
ini = n
1573-
step x | x <= lim = return $ Yield x (x+1)
1574-
| otherwise = return $ Done
1575-
#endif
15761563

15771564
{-# RULES
15781565

vector-stream/vector-stream.cabal

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ Description:
2222
as a backbone for vector package fusion functionality.
2323

2424
Tested-With:
25-
GHC == 8.0.2
26-
GHC == 8.2.2
27-
GHC == 8.4.4
28-
GHC == 8.6.5
2925
GHC == 8.8.4
3026
GHC == 8.10.7
3127
GHC == 9.0.2
@@ -51,7 +47,7 @@ Library
5147
Hs-Source-Dirs:
5248
src
5349

54-
Build-Depends: base >= 4.9 && < 4.23
50+
Build-Depends: base >= 4.13 && < 4.23
5551
, ghc-prim >= 0.2 && < 0.14
5652

5753
source-repository head

vector/src/Data/Vector.hs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -184,16 +184,9 @@ import Data.Primitive.Array
184184
import qualified Data.Vector.Fusion.Bundle as Bundle
185185
import qualified Data.Vector.Generic as G
186186

187-
import Control.DeepSeq ( NFData(rnf)
188-
#if MIN_VERSION_deepseq(1,4,3)
189-
, NFData1(liftRnf)
190-
#endif
191-
)
187+
import Control.DeepSeq ( NFData(rnf), NFData1(liftRnf))
192188

193189
import Control.Monad ( MonadPlus(..), liftM, ap )
194-
#if !MIN_VERSION_base(4,13,0)
195-
import Control.Monad (fail)
196-
#endif
197190
import Control.Monad.ST ( ST, runST )
198191
import Control.Monad.Primitive
199192
import qualified Control.Monad.Fail as Fail
@@ -230,12 +223,10 @@ instance NFData a => NFData (Vector a) where
230223
rnf = liftRnfV rnf
231224
{-# INLINEABLE rnf #-}
232225

233-
#if MIN_VERSION_deepseq(1,4,3)
234226
-- | @since 0.12.1.0
235227
instance NFData1 Vector where
236228
liftRnf = liftRnfV
237229
{-# INLINEABLE liftRnf #-}
238-
#endif
239230

240231
instance Show a => Show (Vector a) where
241232
showsPrec = G.showsPrec
@@ -348,11 +339,6 @@ instance Monad Vector where
348339
{-# INLINE (>>=) #-}
349340
(>>=) = flip concatMap
350341

351-
#if !(MIN_VERSION_base(4,13,0))
352-
{-# INLINE fail #-}
353-
fail = Fail.fail -- == \ _str -> empty
354-
#endif
355-
356342
-- | @since 0.12.1.0
357343
instance Fail.MonadFail Vector where
358344
{-# INLINE fail #-}

vector/src/Data/Vector/Fusion/Bundle/Monadic.hs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,23 +1018,11 @@ enumFromTo_double n m = n `seq` m `seq` fromStream (Stream step ini) (Max (len n
10181018
l = truncate (y-x)+2
10191019

10201020
{-# INLINE_INNER step #-}
1021-
-- GHC changed definition of Enum for Double in GHC8.6 so we have to
1022-
-- accommodate both definitions in order to preserve validity of
1023-
-- rewrite rule
1024-
--
1025-
-- ISSUE: https://gitlab.haskell.org/ghc/ghc/issues/15081
1026-
-- COMMIT: https://gitlab.haskell.org/ghc/ghc/commit/4ffaf4b67773af4c72d92bb8b6c87b1a7d34ac0f
1027-
#if MIN_VERSION_base(4,12,0)
10281021
ini = 0
10291022
step x | x' <= lim = return $ Yield x' (x+1)
10301023
| otherwise = return $ Done
10311024
where
10321025
x' = x + n
1033-
#else
1034-
ini = n
1035-
step x | x <= lim = return $ Yield x (x+1)
1036-
| otherwise = return $ Done
1037-
#endif
10381026

10391027
{-# RULES
10401028

vector/src/Data/Vector/Primitive.hs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,7 @@ import qualified Data.Vector.Fusion.Bundle as Bundle
169169
import Data.Primitive.ByteArray
170170
import Data.Primitive ( Prim, sizeOf )
171171

172-
import Control.DeepSeq ( NFData(rnf)
173-
#if MIN_VERSION_deepseq(1,4,3)
174-
, NFData1(liftRnf)
175-
#endif
176-
)
172+
import Control.DeepSeq ( NFData(rnf), NFData1(liftRnf))
177173

178174
import Control.Monad ( liftM )
179175
import Control.Monad.ST ( ST )
@@ -213,11 +209,9 @@ data Vector a = Vector {-# UNPACK #-} !Int -- ^ offset
213209
instance NFData (Vector a) where
214210
rnf (Vector _ _ _) = ()
215211

216-
#if MIN_VERSION_deepseq(1,4,3)
217212
-- | @since 0.12.1.0
218213
instance NFData1 Vector where
219214
liftRnf _ (Vector _ _ _) = ()
220-
#endif
221215

222216
instance (Show a, Prim a) => Show (Vector a) where
223217
showsPrec = G.showsPrec

vector/src/Data/Vector/Primitive/Mutable.hs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,7 @@ import Data.Word ( Word8 )
7777
import Control.Monad.Primitive
7878
import Control.Monad ( liftM )
7979

80-
import Control.DeepSeq ( NFData(rnf)
81-
#if MIN_VERSION_deepseq(1,4,3)
82-
, NFData1(liftRnf)
83-
#endif
84-
)
80+
import Control.DeepSeq ( NFData(rnf), NFData1(liftRnf))
8581

8682
import Prelude
8783
( Ord, Bool, Int, Maybe, Ordering(..)
@@ -116,10 +112,8 @@ type STVector s = MVector s
116112
instance NFData (MVector s a) where
117113
rnf (MVector _ _ _) = ()
118114

119-
#if MIN_VERSION_deepseq(1,4,3)
120115
instance NFData1 (MVector s) where
121116
liftRnf _ (MVector _ _ _) = ()
122-
#endif
123117

124118
instance Prim a => G.MVector MVector a where
125119
basicLength (MVector _ n _) = n

vector/src/Data/Vector/Storable.hs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,7 @@ import Foreign.ForeignPtr
178178
import Foreign.Ptr
179179
import Foreign.Marshal.Array ( advancePtr, copyArray )
180180

181-
import Control.DeepSeq ( NFData(rnf)
182-
#if MIN_VERSION_deepseq(1,4,3)
183-
, NFData1(liftRnf)
184-
#endif
185-
)
181+
import Control.DeepSeq ( NFData(rnf), NFData1(liftRnf))
186182

187183
import Control.Monad.ST ( ST )
188184
import Control.Monad.Primitive
@@ -221,11 +217,9 @@ data Vector a = Vector {-# UNPACK #-} !Int
221217
instance NFData (Vector a) where
222218
rnf (Vector _ _) = ()
223219

224-
#if MIN_VERSION_deepseq(1,4,3)
225220
-- | @since 0.12.1.0
226221
instance NFData1 Vector where
227222
liftRnf _ (Vector _ _) = ()
228-
#endif
229223

230224
instance (Show a, Storable a) => Show (Vector a) where
231225
showsPrec = G.showsPrec

vector/src/Data/Vector/Storable/Mutable.hs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,7 @@ module Data.Vector.Storable.Mutable(
7676
Storable, PrimMonad, PrimState, RealWorld
7777
) where
7878

79-
import Control.DeepSeq ( NFData(rnf)
80-
#if MIN_VERSION_deepseq(1,4,3)
81-
, NFData1(liftRnf)
82-
#endif
83-
)
79+
import Control.DeepSeq ( NFData(rnf), NFData1(liftRnf))
8480

8581
import qualified Data.Vector.Generic.Mutable as G
8682
import Data.Vector.Storable.Internal
@@ -134,10 +130,8 @@ type STVector s = MVector s
134130
instance NFData (MVector s a) where
135131
rnf (MVector _ _) = ()
136132

137-
#if MIN_VERSION_deepseq(1,4,3)
138133
instance NFData1 (MVector s) where
139134
liftRnf _ (MVector _ _) = ()
140-
#endif
141135

142136
instance Storable a => G.MVector MVector a where
143137
{-# INLINE basicLength #-}

vector/src/Data/Vector/Strict.hs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -184,16 +184,9 @@ import Data.Primitive.Array
184184
import qualified Data.Vector.Generic as G
185185
import qualified Data.Vector as V
186186

187-
import Control.DeepSeq ( NFData(rnf)
188-
#if MIN_VERSION_deepseq(1,4,3)
189-
, NFData1(liftRnf)
190-
#endif
191-
)
187+
import Control.DeepSeq ( NFData(rnf), NFData1(liftRnf))
192188

193189
import Control.Monad ( MonadPlus(..), ap )
194-
#if !MIN_VERSION_base(4,13,0)
195-
import Control.Monad (fail)
196-
#endif
197190
import Control.Monad.ST ( ST, runST )
198191
import Control.Monad.Primitive
199192
import qualified Control.Monad.Fail as Fail
@@ -241,12 +234,10 @@ instance NFData a => NFData (Vector a) where
241234
rnf = liftRnfV rnf
242235
{-# INLINEABLE rnf #-}
243236

244-
#if MIN_VERSION_deepseq(1,4,3)
245237
-- | @since 0.13.2.0
246238
instance NFData1 Vector where
247239
liftRnf = liftRnfV
248240
{-# INLINEABLE liftRnf #-}
249-
#endif
250241

251242
instance Show a => Show (Vector a) where
252243
showsPrec = G.showsPrec
@@ -335,11 +326,6 @@ instance Monad Vector where
335326
{-# INLINE (>>=) #-}
336327
(>>=) = flip concatMap
337328

338-
#if !(MIN_VERSION_base(4,13,0))
339-
{-# INLINE fail #-}
340-
fail = Fail.fail -- == \ _str -> empty
341-
#endif
342-
343329
-- | @since 0.13.2.0
344330
instance Fail.MonadFail Vector where
345331
{-# INLINE fail #-}

0 commit comments

Comments
 (0)