packages feed

fuzzy-time-gen 0.2.0.0 → 0.2.0.1

raw patch · 5 files changed

+15/−12 lines, 5 files

Files

CHANGELOG.md view
@@ -1,7 +1,13 @@ # Changelog +## [0.2.0.1] - 2022-09-24++### Changed++* Compatibility with `GHC 9.4`+ ## [0.2.0.0] - 2021-11-21  ### Changed -- Compatibility with `genvalidity >=1.0`+* Compatibility with `genvalidity >=1.0`
bench/Bench.hs view
@@ -13,6 +13,5 @@     [ genValidBench @FuzzyLocalTime,       genValidBench @FuzzyTimeOfDay,       genValidBench @FuzzyDay,-      genValidBench @DayOfTheWeek,       genValidBench @Month     ]
fuzzy-time-gen.cabal view
@@ -1,13 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.4.+-- This file has been generated from package.yaml by hpack version 0.34.7. -- -- see: https://github.com/sol/hpack------ hash: 1e748bc7a30876b6d377b5c436bac4c641bbf45a5acd29c98897ad0e0fb3ad26  name:           fuzzy-time-gen-version:        0.2.0.0+version:        0.2.0.1 description:    Generators for fuzzy-time types category:       Time homepage:       https://github.com/NorfairKing/fuzzy-time
src/Data/FuzzyTime/Types/Gen.hs view
@@ -30,7 +30,7 @@         AtMinute <$> choose (0, 23) <*> choose (0, 59),         AtExact <$> genValid,         HoursDiff <$> choose (-23, 23),-        MinutesDiff <$> choose (- (24 * 60 - 1), 24 * 60 - 1),+        MinutesDiff <$> choose (-(24 * 60 - 1), 24 * 60 - 1),         SecondsDiff <$> genValid       ]       `suchThat` isValid
test/Data/FuzzyTime/ResolveSpec.hs view
@@ -198,19 +198,19 @@       it "has an inverse with (small) hoursDiff" $         forAllValid $           \tod ->-            forAll (choose (- (24 - 1), 24 - 1)) $ \hd ->-              resolveTimeOfDay (resolveTimeOfDay tod (HoursDiff hd)) (HoursDiff (- hd)) `shouldBe` tod+            forAll (choose (-(24 - 1), 24 - 1)) $ \hd ->+              resolveTimeOfDay (resolveTimeOfDay tod (HoursDiff hd)) (HoursDiff (-hd)) `shouldBe` tod       it "has an inverse with (small) minutesDiff" $         forAllValid $           \tod ->-            forAll (choose (- (24 * 60 - 1), 24 * 60 - 1)) $ \md ->-              resolveTimeOfDay (resolveTimeOfDay tod (MinutesDiff md)) (MinutesDiff (- md))+            forAll (choose (-(24 * 60 - 1), 24 * 60 - 1)) $ \md ->+              resolveTimeOfDay (resolveTimeOfDay tod (MinutesDiff md)) (MinutesDiff (-md))                 `shouldBe` tod       it "has an inverse with (small) secondsDiff" $         forAllValid $           \tod ->             forAll (max (-1000) . min 1000 <$> genValid) $ \sd ->-              resolveTimeOfDay (resolveTimeOfDay tod (SecondsDiff sd)) (SecondsDiff (- sd))+              resolveTimeOfDay (resolveTimeOfDay tod (SecondsDiff sd)) (SecondsDiff (-sd))                 `shouldBe` tod   describe "resolveDay" $ do     it "produces valid days" $ producesValid2 resolveDay