diff options
author | Joey Hess <joey@kitenet.net> | 2014-03-20 11:08:40 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-03-20 11:08:40 -0400 |
commit | c538edd55032747f05fafefbd664c2f04423c1b8 (patch) | |
tree | ec73f33a36ec68ee50240c1983b178f390198c6e /Utility | |
parent | 8f8a146312ec999914d09451307327d190cbfb56 (diff) |
fix build with QuickCheck 2.7.1
For some reason this was working w/o a cast before, despite POSIXTime etc
being newtypes. It stopped working with the new QuickCheck:
Utility/QuickCheck.hs:31:33:
No instance for (Integral POSIXTime)
arising from a use of `arbitrarySizedIntegral'
Possible fix: add an instance declaration for (Integral POSIXTime)
In the first argument of `nonNegative', namely
`arbitrarySizedIntegral'
In the expression: nonNegative arbitrarySizedIntegral
In an equation for `arbitrary':
arbitrary = nonNegative arbitrarySizedIntegral
Diffstat (limited to 'Utility')
-rw-r--r-- | Utility/QuickCheck.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Utility/QuickCheck.hs b/Utility/QuickCheck.hs index e2539f3d6..7f7234c7c 100644 --- a/Utility/QuickCheck.hs +++ b/Utility/QuickCheck.hs @@ -28,10 +28,10 @@ instance (Arbitrary v, Eq v, Ord v) => Arbitrary (S.Set v) where {- Times before the epoch are excluded. -} instance Arbitrary POSIXTime where - arbitrary = nonNegative arbitrarySizedIntegral + arbitrary = fromInteger <$> nonNegative arbitrarySizedIntegral instance Arbitrary EpochTime where - arbitrary = nonNegative arbitrarySizedIntegral + arbitrary = fromInteger <$> nonNegative arbitrarySizedIntegral {- Pids are never negative, or 0. -} instance Arbitrary ProcessID where |