Fix build with QuickCheck 2.10.
QuickCheck added an Arbitrary instance for CTime aka EpochTime. However, while git-annex's instance disallowed times before the epoch, QuickCheck's does not. So, rather than using its instance, convert from an Integer. This commit was sponsored by Thomas Hochstein on Patreon.
This commit is contained in:
parent
27f7c8d09a
commit
75cecbbe3f
4 changed files with 9 additions and 5 deletions
|
@ -210,7 +210,8 @@ instance Arbitrary InodeCache where
|
|||
let prim = InodeCachePrim
|
||||
<$> arbitrary
|
||||
<*> arbitrary
|
||||
<*> arbitrary
|
||||
-- timestamp cannot be negative
|
||||
<*> (abs . fromInteger <$> arbitrary)
|
||||
in InodeCache <$> prim
|
||||
|
||||
#ifdef mingw32_HOST_OS
|
||||
|
|
|
@ -35,9 +35,6 @@ instance (Arbitrary v, Ord v) => Arbitrary (S.Set v) where
|
|||
instance Arbitrary POSIXTime where
|
||||
arbitrary = fromInteger <$> nonNegative arbitrarySizedIntegral
|
||||
|
||||
instance Arbitrary EpochTime where
|
||||
arbitrary = fromInteger <$> nonNegative arbitrarySizedIntegral
|
||||
|
||||
{- Pids are never negative, or 0. -}
|
||||
instance Arbitrary ProcessID where
|
||||
arbitrary = arbitrarySizedBoundedIntegral `suchThat` (> 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue