genvalidity-time 0.2.0.2 → 0.2.1.0
raw patch · 3 files changed
+17/−9 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- genvalidity-time.cabal +5/−4
- src/Data/GenValidity/Time/Clock.hs +10/−3
- src/Data/GenValidity/Time/Format.hs +2/−2
genvalidity-time.cabal view
@@ -1,18 +1,19 @@--- This file has been generated from package.yaml by hpack version 0.20.0.+-- This file has been generated from package.yaml by hpack version 0.28.2. -- -- see: https://github.com/sol/hpack ----- hash: 3ab04477a69e97392c72d90216817a0224ea9ca00e1f25c8deda7368f63c0864+-- hash: 09c2e73a04279740d2caa8197cb474313ddaafec777e470f43a2076a0c70c2ea name: genvalidity-time-version: 0.2.0.2+version: 0.2.1.0 synopsis: GenValidity support for time description: Please see README.md category: Testing homepage: https://github.com/NorfairKing/validity#readme bug-reports: https://github.com/NorfairKing/validity/issues author: Tom Sydney Kerckhove-maintainer: syd.kerckhove@gmail.com+maintainer: syd.kerckhove@gmail.com,+ nick.van.den.broeck666@gmail.com copyright: Copyright: (c) 2017-2018 Tom Sydney Kerckhove license: MIT license-file: LICENSE
src/Data/GenValidity/Time/Clock.hs view
@@ -22,9 +22,12 @@ instance GenUnchecked DiffTime where genUnchecked = picosecondsToDiffTime <$> genUnchecked+#if MIN_VERSION_time(1,6,0) shrinkUnchecked = fmap picosecondsToDiffTime . shrinkUnchecked . diffTimeToPicoseconds-+#else+ shrinkUnchecked = const []+#endif instance GenValid DiffTime where genValid = picosecondsToDiffTime <$> genValid @@ -42,6 +45,10 @@ instance GenUnchecked NominalDiffTime where genUnchecked = diffUTCTime <$> genUnchecked <*> genUnchecked- shrinkUnchecked _ = []-+#if MIN_VERSION_time(1,9,0)+ shrinkUnchecked =+ fmap secondsToNominalDiffTime . shrinkUnchecked . nominalDiffTimeToSeconds+#else+ shrinkUnchecked = const []+#endif instance GenValid NominalDiffTime
src/Data/GenValidity/Time/Format.hs view
@@ -2,12 +2,12 @@ {-# LANGUAGE CPP #-} module Data.GenValidity.Time.Format where-+#if MIN_VERSION_time(1,5,0) import Data.GenValidity import Data.GenValidity.Time.LocalTime () import Data.Time.Format import Data.Validity.Time.Format ()-#if MIN_VERSION_time(1,5,0)+ instance GenUnchecked TimeLocale where genUnchecked = TimeLocale <$> genUnchecked <*> genUnchecked <*> genUnchecked <*>