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:
Joey Hess 2017-06-17 13:04:48 -04:00
parent 27f7c8d09a
commit 75cecbbe3f
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 9 additions and 5 deletions

View file

@ -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