Skip to content

Commit 7e10eb6

Browse files
committed
Removed 'propPopCount' for GHC <= 7.6.*
1 parent f9a2995 commit 7e10eb6

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tests/Tests.hs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE CPP #-}
12
{-# LANGUAGE TypeSynonymInstances #-}
23
{-# LANGUAGE FlexibleInstances #-}
34

@@ -184,10 +185,12 @@ propStorable storable = monadicIO $ do
184185
size = sizeOf storable
185186

186187

188+
#if defined(__GLASGOW_HASKELL__) && (__GLASGOW_HASKELL__ >= 706)
187189
propPopCount :: FasterInteger -> Property
188190
propPopCount xfi = xfi >= 0 ==> popCount xfi == popCount xi where
189191
xi :: Integer
190192
xi = fromIntegral xfi
193+
#endif
191194

192195
propTestBit :: FasterInteger -> Int16 -> Property
193196
propTestBit xfi i = xfi >= 0 ==> testBit xfi bit == testBit xi bit where
@@ -258,8 +261,12 @@ main = defaultMain tests where
258261

259262
testsFasterInteger :: [Test]
260263
testsFasterInteger =
261-
[ testProperty "pop count" propPopCount
262-
, testProperty "test bit" propTestBit
264+
[
265+
#if defined(__GLASGOW_HASKELL__) && (__GLASGOW_HASKELL__ >= 706)
266+
testProperty "pop count" propPopCount
267+
,
268+
#endif
269+
testProperty "test bit" propTestBit
263270
, testProperty "set bit" propSetBit
264271
, testProperty "clear bit" propClearBit
265272
]

0 commit comments

Comments
 (0)