Skip to content

Commit 72b1552

Browse files
authored
Support QuickCheck-2.17 (#716)
1 parent 0178d46 commit 72b1552

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/Properties/ByteString.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,13 @@ instance RdInt Word64 where { bread = B.readWord64; sread = readWord64 }
108108
instance RdInt Integer where { bread = B.readInteger; sread = readInteger }
109109
instance RdInt Natural where { bread = B.readNatural; sread = readNatural }
110110

111+
#if !MIN_VERSION_QuickCheck(2,17,0)
111112
instance Arbitrary Natural where
112113
arbitrary = i2n <$> arbitrary
113114
where i2n :: Integer -> Natural
114115
i2n i | i >= 0 = fromIntegral i
115116
| otherwise = fromIntegral $ negate i
117+
#endif
116118

117119
testRdInt :: forall a. (Arbitrary a, RdInt a) => String -> TestTree
118120
testRdInt s = testGroup s $

0 commit comments

Comments
 (0)