Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ jobs:
- { cabal: "3.12", os: ubuntu-22.04, ghc: "9.6.6" }
- { cabal: "3.12", os: ubuntu-22.04, ghc: "9.6.6",
flags: "-fUnsafeChecks -fInternalChecks" }
- { cabal: "3.12", os: ubuntu-22.04, ghc: "9.8.2" }
- { cabal: "3.12", os: ubuntu-22.04, ghc: "9.8.4" }
- { cabal: "3.12", os: ubuntu-22.04, ghc: "9.10.1" }
- { cabal: "3.12", os: ubuntu-22.04, ghc: "9.12" }
# Win
- { cabal: "3.12", os: windows-latest, ghc: "8.4.4" }
# OOM when building tests
Expand All @@ -49,8 +50,9 @@ jobs:
- { cabal: "3.12", os: macOS-latest, ghc: "9.2.8" }
- { cabal: "3.12", os: macOS-latest, ghc: "9.4.8" }
- { cabal: "3.12", os: macOS-latest, ghc: "9.6.6" }
- { cabal: "3.12", os: macOS-latest, ghc: "9.8.2" }
- { cabal: "3.12", os: macOS-latest, ghc: "9.8.4" }
- { cabal: "3.12", os: macOS-latest, ghc: "9.10.1" }
- { cabal: "3.12", os: macOS-latest, ghc: "9.12" }
fail-fast: false

steps:
Expand Down
4 changes: 4 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ packages:
vector
vector-stream
vector-bench-papi

-- Always build tests
tests: True

2 changes: 1 addition & 1 deletion vector-stream/vector-stream.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Library
src

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

source-repository head
type: git
Expand Down
3 changes: 0 additions & 3 deletions vector/src/Data/Vector.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
Expand Down Expand Up @@ -203,7 +202,6 @@ import Prelude
, (>>=), (+), (-), (<), (<=), (>), (>=), (==), (/=), (&&), (.), ($) )

import Data.Functor.Classes (Eq1 (..), Ord1 (..), Read1 (..), Show1 (..))
import Data.Typeable ( Typeable )
import Data.Data ( Data(..) )
import Text.Read ( Read(..), readListPrecDefault )
import Data.Semigroup ( Semigroup(..) )
Expand All @@ -219,7 +217,6 @@ import qualified GHC.Exts as Exts (IsList(..))
data Vector a = Vector {-# UNPACK #-} !Int
{-# UNPACK #-} !Int
{-# UNPACK #-} !(Array a)
deriving ( Typeable )

liftRnfV :: (a -> ()) -> Vector a -> ()
liftRnfV elemRnf = foldl' (\_ -> elemRnf) ()
Expand Down
4 changes: 0 additions & 4 deletions vector/src/Data/Vector/Mutable.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RoleAnnotations #-}
Expand Down Expand Up @@ -82,8 +81,6 @@ import Prelude
, compare, return, otherwise, error
, (>>=), (+), (-), (*), (<), (>), (>=), (&&), (||), ($), (>>) )

import Data.Typeable ( Typeable )

#include "vector.h"

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

type IOVector = MVector RealWorld
type STVector s = MVector s
Expand Down
3 changes: 0 additions & 3 deletions vector/src/Data/Vector/Primitive.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
Expand Down Expand Up @@ -180,7 +179,6 @@ import Prelude
, compare, mempty, mappend, mconcat, showsPrec, return, otherwise, seq, error, undefined
, (+), (*), (<), (<=), (>), (>=), (==), (/=), ($!) )

import Data.Typeable ( Typeable )
import Data.Data ( Data(..) )
import Text.Read ( Read(..), readListPrecDefault )
import Data.Semigroup ( Semigroup(..) )
Expand All @@ -206,7 +204,6 @@ unsafeCoerceVector = unsafeCoerce
data Vector a = Vector {-# UNPACK #-} !Int -- ^ offset
{-# UNPACK #-} !Int -- ^ length
{-# UNPACK #-} !ByteArray -- ^ underlying byte array
deriving ( Typeable )

instance NFData (Vector a) where
rnf (Vector _ _ _) = ()
Expand Down
3 changes: 0 additions & 3 deletions vector/src/Data/Vector/Primitive/Mutable.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RoleAnnotations #-}
Expand Down Expand Up @@ -88,7 +87,6 @@ import Prelude
, otherwise, error, undefined, div, show, maxBound
, (+), (*), (<), (>), (>=), (==), (&&), (||), ($), (++) )

import Data.Typeable ( Typeable )
import Data.Coerce
import Unsafe.Coerce

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

type IOVector = MVector RealWorld
type STVector s = MVector s
Expand Down
3 changes: 0 additions & 3 deletions vector/src/Data/Vector/Storable.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
Expand Down Expand Up @@ -188,7 +187,6 @@ import Prelude
, compare, mempty, mappend, mconcat, showsPrec, return, seq, undefined, div
, (*), (<), (<=), (>), (>=), (==), (/=), (&&), (.), ($) )

import Data.Typeable ( Typeable )
import Data.Data ( Data(..) )
import Text.Read ( Read(..), readListPrecDefault )
import Data.Semigroup ( Semigroup(..) )
Expand Down Expand Up @@ -216,7 +214,6 @@ unsafeCoerceVector = unsafeCoerce
-- | 'Storable'-based vectors.
data Vector a = Vector {-# UNPACK #-} !Int
{-# UNPACK #-} !(ForeignPtr a)
deriving ( Typeable )

instance NFData (Vector a) where
rnf (Vector _ _) = ()
Expand Down
4 changes: 0 additions & 4 deletions vector/src/Data/Vector/Storable/Mutable.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE MultiParamTypeClasses #-}
Expand Down Expand Up @@ -106,8 +105,6 @@ import Prelude
, return, otherwise, error, undefined, max, div, quot, maxBound, show
, (-), (*), (<), (>), (>=), (==), (&&), (||), (.), ($), (++) )

import Data.Typeable ( Typeable )

import Data.Coerce
import Unsafe.Coerce

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

type IOVector = MVector RealWorld
type STVector s = MVector s
Expand Down
4 changes: 1 addition & 3 deletions vector/src/Data/Vector/Strict.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
Expand Down Expand Up @@ -204,7 +203,6 @@ import Prelude
, (>>=), (+), (-), (.), ($), seq)

import Data.Functor.Classes (Eq1 (..), Ord1 (..), Read1 (..), Show1 (..))
import Data.Typeable ( Typeable )
import Data.Data ( Data(..) )
import Text.Read ( Read(..), readListPrecDefault )
import Data.Semigroup ( Semigroup(..) )
Expand All @@ -218,7 +216,7 @@ import qualified GHC.Exts as Exts (IsList(..))

-- | Strict boxed vectors, supporting efficient slicing.
newtype Vector a = Vector (V.Vector a)
deriving (Typeable, Foldable.Foldable, Semigroup, Monoid)
deriving (Foldable.Foldable, Semigroup, Monoid)

-- NOTE: [GND for strict vector]
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
4 changes: 0 additions & 4 deletions vector/src/Data/Vector/Strict/Mutable.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RoleAnnotations #-}
Expand Down Expand Up @@ -86,15 +85,12 @@ import Prelude
( Ord, Monad(..), Bool, Int, Maybe, Ordering(..)
, return, ($), (<$>) )

import Data.Typeable ( Typeable )

#include "vector.h"

type role MVector nominal representational

-- | Mutable boxed vectors keyed on the monad they live in ('IO' or @'ST' s@).
newtype MVector s a = MVector (MV.MVector s a)
deriving ( Typeable )

type IOVector = MVector RealWorld
type STVector s = MVector s
Expand Down
8 changes: 0 additions & 8 deletions vector/src/Data/Vector/Unboxed/Base.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
Expand Down Expand Up @@ -58,7 +57,6 @@ import Data.Complex
import Data.Monoid (Dual(..),Sum(..),Product(..),All(..),Any(..))
import Data.Monoid (Alt(..))
import Data.Semigroup (Min(..),Max(..),First(..),Last(..),WrappedMonoid(..),Arg(..))
import Data.Typeable ( Typeable )
import Data.Data ( Data(..) )
import GHC.Exts ( Down(..) )
import GHC.Generics
Expand Down Expand Up @@ -91,12 +89,6 @@ instance NFData1 (MVector s) where
liftRnf _ !_ = ()
#endif

-- -----------------
-- Data and Typeable
-- -----------------
deriving instance Typeable Vector
deriving instance Typeable MVector

instance (Data a, Unbox a) => Data (Vector a) where
gfoldl = G.gfoldl
toConstr _ = G.mkVecConstr "Data.Vector.Unboxed.Vector"
Expand Down
4 changes: 2 additions & 2 deletions vector/vector.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ common tests-common
, vector
, primitive
, random
, QuickCheck >= 2.9 && < 2.15
, QuickCheck >= 2.9 && < 2.16
, tasty
, tasty-hunit
, tasty-quickcheck
Expand Down Expand Up @@ -244,7 +244,7 @@ test-suite vector-doctest
buildable: False
build-depends:
base -any
, doctest >=0.15 && <0.23
, doctest >=0.15 && <0.24
, primitive >= 0.6.4.0 && < 0.10
, vector -any

Expand Down
Loading