Skip to content

Commit f7be437

Browse files
authored
Bump dependencies (support ghc 9.12) (#516)
* CI: Add ghc 9.12 to the build matrix * Remove all derived Typeable instances
1 parent 141449b commit f7be437

File tree

13 files changed

+12
-40
lines changed

13 files changed

+12
-40
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ jobs:
3030
- { cabal: "3.12", os: ubuntu-22.04, ghc: "9.6.6" }
3131
- { cabal: "3.12", os: ubuntu-22.04, ghc: "9.6.6",
3232
flags: "-fUnsafeChecks -fInternalChecks" }
33-
- { cabal: "3.12", os: ubuntu-22.04, ghc: "9.8.2" }
33+
- { cabal: "3.12", os: ubuntu-22.04, ghc: "9.8.4" }
3434
- { cabal: "3.12", os: ubuntu-22.04, ghc: "9.10.1" }
35+
- { cabal: "3.12", os: ubuntu-22.04, ghc: "9.12" }
3536
# Win
3637
- { cabal: "3.12", os: windows-latest, ghc: "8.4.4" }
3738
# OOM when building tests
@@ -49,8 +50,9 @@ jobs:
4950
- { cabal: "3.12", os: macOS-latest, ghc: "9.2.8" }
5051
- { cabal: "3.12", os: macOS-latest, ghc: "9.4.8" }
5152
- { cabal: "3.12", os: macOS-latest, ghc: "9.6.6" }
52-
- { cabal: "3.12", os: macOS-latest, ghc: "9.8.2" }
53+
- { cabal: "3.12", os: macOS-latest, ghc: "9.8.4" }
5354
- { cabal: "3.12", os: macOS-latest, ghc: "9.10.1" }
55+
- { cabal: "3.12", os: macOS-latest, ghc: "9.12" }
5456
fail-fast: false
5557

5658
steps:

cabal.project

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@ packages:
22
vector
33
vector-stream
44
vector-bench-papi
5+
6+
-- Always build tests
7+
tests: True
8+

vector-stream/vector-stream.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Library
5050
src
5151

5252
Build-Depends: base >= 4.9 && < 4.22
53-
, ghc-prim >= 0.2 && < 0.12
53+
, ghc-prim >= 0.2 && < 0.14
5454

5555
source-repository head
5656
type: git

vector/src/Data/Vector.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{-# LANGUAGE BangPatterns #-}
22
{-# LANGUAGE CPP #-}
3-
{-# LANGUAGE DeriveDataTypeable #-}
43
{-# LANGUAGE FlexibleInstances #-}
54
{-# LANGUAGE MultiParamTypeClasses #-}
65
{-# LANGUAGE RankNTypes #-}
@@ -203,7 +202,6 @@ import Prelude
203202
, (>>=), (+), (-), (<), (<=), (>), (>=), (==), (/=), (&&), (.), ($) )
204203

205204
import Data.Functor.Classes (Eq1 (..), Ord1 (..), Read1 (..), Show1 (..))
206-
import Data.Typeable ( Typeable )
207205
import Data.Data ( Data(..) )
208206
import Text.Read ( Read(..), readListPrecDefault )
209207
import Data.Semigroup ( Semigroup(..) )
@@ -219,7 +217,6 @@ import qualified GHC.Exts as Exts (IsList(..))
219217
data Vector a = Vector {-# UNPACK #-} !Int
220218
{-# UNPACK #-} !Int
221219
{-# UNPACK #-} !(Array a)
222-
deriving ( Typeable )
223220

224221
liftRnfV :: (a -> ()) -> Vector a -> ()
225222
liftRnfV elemRnf = foldl' (\_ -> elemRnf) ()

vector/src/Data/Vector/Mutable.hs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{-# LANGUAGE BangPatterns #-}
22
{-# LANGUAGE CPP #-}
3-
{-# LANGUAGE DeriveDataTypeable #-}
43
{-# LANGUAGE FlexibleInstances #-}
54
{-# LANGUAGE MultiParamTypeClasses #-}
65
{-# LANGUAGE RoleAnnotations #-}
@@ -82,8 +81,6 @@ import Prelude
8281
, compare, return, otherwise, error
8382
, (>>=), (+), (-), (*), (<), (>), (>=), (&&), (||), ($), (>>) )
8483

85-
import Data.Typeable ( Typeable )
86-
8784
#include "vector.h"
8885

8986
type role MVector nominal representational
@@ -96,7 +93,6 @@ data MVector s a = MVector { _offset :: {-# UNPACK #-} !Int
9693
, _array :: {-# UNPACK #-} !(MutableArray s a)
9794
-- ^ Underlying array
9895
}
99-
deriving ( Typeable )
10096

10197
type IOVector = MVector RealWorld
10298
type STVector s = MVector s

vector/src/Data/Vector/Primitive.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{-# LANGUAGE CPP #-}
2-
{-# LANGUAGE DeriveDataTypeable #-}
32
{-# LANGUAGE FlexibleInstances #-}
43
{-# LANGUAGE MultiParamTypeClasses #-}
54
{-# LANGUAGE RankNTypes #-}
@@ -180,7 +179,6 @@ import Prelude
180179
, compare, mempty, mappend, mconcat, showsPrec, return, otherwise, seq, error, undefined
181180
, (+), (*), (<), (<=), (>), (>=), (==), (/=), ($!) )
182181

183-
import Data.Typeable ( Typeable )
184182
import Data.Data ( Data(..) )
185183
import Text.Read ( Read(..), readListPrecDefault )
186184
import Data.Semigroup ( Semigroup(..) )
@@ -206,7 +204,6 @@ unsafeCoerceVector = unsafeCoerce
206204
data Vector a = Vector {-# UNPACK #-} !Int -- ^ offset
207205
{-# UNPACK #-} !Int -- ^ length
208206
{-# UNPACK #-} !ByteArray -- ^ underlying byte array
209-
deriving ( Typeable )
210207

211208
instance NFData (Vector a) where
212209
rnf (Vector _ _ _) = ()

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{-# LANGUAGE CPP #-}
2-
{-# LANGUAGE DeriveDataTypeable #-}
32
{-# LANGUAGE FlexibleInstances #-}
43
{-# LANGUAGE MultiParamTypeClasses #-}
54
{-# LANGUAGE RoleAnnotations #-}
@@ -88,7 +87,6 @@ import Prelude
8887
, otherwise, error, undefined, div, show, maxBound
8988
, (+), (*), (<), (>), (>=), (==), (&&), (||), ($), (++) )
9089

91-
import Data.Typeable ( Typeable )
9290
import Data.Coerce
9391
import Unsafe.Coerce
9492

@@ -112,7 +110,6 @@ unsafeCoerceMVector = unsafeCoerce
112110
data MVector s a = MVector {-# UNPACK #-} !Int -- ^ offset
113111
{-# UNPACK #-} !Int -- ^ length
114112
{-# UNPACK #-} !(MutableByteArray s) -- ^ underlying mutable byte array
115-
deriving ( Typeable )
116113

117114
type IOVector = MVector RealWorld
118115
type STVector s = MVector s

vector/src/Data/Vector/Storable.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{-# LANGUAGE CPP #-}
2-
{-# LANGUAGE DeriveDataTypeable #-}
32
{-# LANGUAGE FlexibleInstances #-}
43
{-# LANGUAGE MultiParamTypeClasses #-}
54
{-# LANGUAGE RankNTypes #-}
@@ -188,7 +187,6 @@ import Prelude
188187
, compare, mempty, mappend, mconcat, showsPrec, return, seq, undefined, div
189188
, (*), (<), (<=), (>), (>=), (==), (/=), (&&), (.), ($) )
190189

191-
import Data.Typeable ( Typeable )
192190
import Data.Data ( Data(..) )
193191
import Text.Read ( Read(..), readListPrecDefault )
194192
import Data.Semigroup ( Semigroup(..) )
@@ -216,7 +214,6 @@ unsafeCoerceVector = unsafeCoerce
216214
-- | 'Storable'-based vectors.
217215
data Vector a = Vector {-# UNPACK #-} !Int
218216
{-# UNPACK #-} !(ForeignPtr a)
219-
deriving ( Typeable )
220217

221218
instance NFData (Vector a) where
222219
rnf (Vector _ _) = ()

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{-# LANGUAGE CPP #-}
2-
{-# LANGUAGE DeriveDataTypeable #-}
32
{-# LANGUAGE FlexibleInstances #-}
43
{-# LANGUAGE MagicHash #-}
54
{-# LANGUAGE MultiParamTypeClasses #-}
@@ -106,8 +105,6 @@ import Prelude
106105
, return, otherwise, error, undefined, max, div, quot, maxBound, show
107106
, (-), (*), (<), (>), (>=), (==), (&&), (||), (.), ($), (++) )
108107

109-
import Data.Typeable ( Typeable )
110-
111108
import Data.Coerce
112109
import Unsafe.Coerce
113110

@@ -131,7 +128,6 @@ unsafeCoerceMVector = unsafeCoerce
131128
-- | Mutable 'Storable'-based vectors.
132129
data MVector s a = MVector {-# UNPACK #-} !Int
133130
{-# UNPACK #-} !(ForeignPtr a)
134-
deriving ( Typeable )
135131

136132
type IOVector = MVector RealWorld
137133
type STVector s = MVector s

vector/src/Data/Vector/Strict.hs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{-# LANGUAGE BangPatterns #-}
22
{-# LANGUAGE CPP #-}
3-
{-# LANGUAGE DeriveDataTypeable #-}
43
{-# LANGUAGE FlexibleInstances #-}
54
{-# LANGUAGE MultiParamTypeClasses #-}
65
{-# LANGUAGE RankNTypes #-}
@@ -204,7 +203,6 @@ import Prelude
204203
, (>>=), (+), (-), (.), ($), seq)
205204

206205
import Data.Functor.Classes (Eq1 (..), Ord1 (..), Read1 (..), Show1 (..))
207-
import Data.Typeable ( Typeable )
208206
import Data.Data ( Data(..) )
209207
import Text.Read ( Read(..), readListPrecDefault )
210208
import Data.Semigroup ( Semigroup(..) )
@@ -218,7 +216,7 @@ import qualified GHC.Exts as Exts (IsList(..))
218216

219217
-- | Strict boxed vectors, supporting efficient slicing.
220218
newtype Vector a = Vector (V.Vector a)
221-
deriving (Typeable, Foldable.Foldable, Semigroup, Monoid)
219+
deriving (Foldable.Foldable, Semigroup, Monoid)
222220

223221
-- NOTE: [GND for strict vector]
224222
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)