Skip to content

Commit 31edb3f

Browse files
committed
test suite shoulnd't have its own cabal file, was breaking CI testing
also adding cabal.project file (doesn't yet integrate benchmarks stuff) also dropping orphan quick check instances. and suppressing ghc 8.0 series redundant constraint warning for now
1 parent a3a198c commit 31edb3f

File tree

4 files changed

+14
-69
lines changed

4 files changed

+14
-69
lines changed

cabal.project

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
packages: vector.cabal

tests/Utilities.hs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,6 @@ instance Arbitrary a => Arbitrary (S.Bundle v a) where
5252
instance CoArbitrary a => CoArbitrary (S.Bundle v a) where
5353
coarbitrary = coarbitrary . S.toList
5454

55-
instance Arbitrary a => Arbitrary (Identity a) where
56-
arbitrary = fmap Identity arbitrary
57-
58-
instance CoArbitrary a => CoArbitrary (Identity a) where
59-
coarbitrary = coarbitrary . runIdentity
60-
6155
instance Arbitrary a => Arbitrary (Writer a ()) where
6256
arbitrary = fmap (writer . ((,) ())) arbitrary
6357

@@ -219,7 +213,7 @@ notNullS2 _ s = not $ S.null s
219213

220214
-- Generators
221215
index_value_pairs :: Arbitrary a => Int -> Gen [(Int,a)]
222-
index_value_pairs 0 = return []
216+
index_value_pairs 0 = return []
223217
index_value_pairs m = sized $ \n ->
224218
do
225219
len <- choose (0,n)
@@ -254,7 +248,7 @@ accum f xs ps = go xs ps' 0
254248
go (x:xs) ((i,y) : ps) j
255249
| i == j = go (f x y : xs) ps j
256250
go (x:xs) ps j = x : go xs ps (j+1)
257-
go [] _ _ = []
251+
go [] _ _ = []
258252

259253
(//) :: [a] -> [(Int, a)] -> [a]
260254
xs // ps = go xs ps' 0

tests/vector-tests.cabal

Lines changed: 0 additions & 59 deletions
This file was deleted.

vector.cabal

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ Library
147147

148148
Ghc-Options: -O2 -Wall -fno-warn-orphans
149149

150+
if impl(ghc >= 8.0) && impl( ghc < 8.1)
151+
Ghc-Options: -Wno-redundant-constraints
152+
150153
if flag(BoundsChecks)
151154
cpp-options: -DVECTOR_BOUNDS_CHECKS
152155

@@ -169,7 +172,7 @@ test-suite vector-tests-O0
169172
hs-source-dirs: tests
170173
Build-Depends: base >= 4 && < 5, template-haskell, vector,
171174
random,
172-
QuickCheck >= 2.7 && < 2.8 , test-framework, test-framework-quickcheck2,
175+
QuickCheck >= 2.9 && < 2.10 , test-framework, test-framework-quickcheck2,
173176
transformers >= 0.2.0.0
174177

175178
default-extensions: CPP,
@@ -184,6 +187,9 @@ test-suite vector-tests-O0
184187

185188
Ghc-Options: -O0
186189
Ghc-Options: -Wall -fno-warn-orphans -fno-warn-missing-signatures
190+
if impl(ghc >= 8.0) && impl( ghc < 8.1)
191+
Ghc-Options: -Wno-redundant-constraints
192+
187193

188194
test-suite vector-tests-O2
189195
Default-Language: Haskell2010
@@ -192,7 +198,7 @@ test-suite vector-tests-O2
192198
hs-source-dirs: tests
193199
Build-Depends: base >= 4 && < 5, template-haskell, vector,
194200
random,
195-
QuickCheck >= 2.7, test-framework, test-framework-quickcheck2,
201+
QuickCheck >= 2.9 && < 2.10 , test-framework, test-framework-quickcheck2,
196202
transformers >= 0.2.0.0
197203

198204
default-extensions: CPP,
@@ -206,4 +212,7 @@ test-suite vector-tests-O2
206212
TemplateHaskell
207213

208214
Ghc-Options: -O2
215+
if impl(ghc >= 8.0) && impl( ghc < 8.1)
216+
Ghc-Options: -Wno-redundant-constraints
217+
209218
Ghc-Options: -Wall -fno-warn-orphans -fno-warn-missing-signatures

0 commit comments

Comments
 (0)