From f2c83fe1c7bfefe3a59fef75fa6ecc93a8fd95e2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 17 Jun 2017 13:04:48 -0400 Subject: 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. --- Key.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Key.hs') diff --git a/Key.hs b/Key.hs index 8672c827c..44e9acea4 100644 --- a/Key.hs +++ b/Key.hs @@ -147,7 +147,7 @@ instance Arbitrary Key where <$> (listOf1 $ elements $ ['A'..'Z'] ++ ['a'..'z'] ++ ['0'..'9'] ++ "-_\r\n \t") <*> (parseKeyVariety <$> (listOf1 $ elements ['A'..'Z'])) -- BACKEND <*> ((abs <$>) <$> arbitrary) -- size cannot be negative - <*> arbitrary + <*> ((abs . fromInteger <$>) <$> arbitrary) -- mtime cannot be negative <*> ((abs <$>) <$> arbitrary) -- chunksize cannot be negative <*> ((succ . abs <$>) <$> arbitrary) -- chunknum cannot be 0 or negative -- cgit v1.2.3