binary-orphans 0.1.6.0 → 0.1.7.0
raw patch · 4 files changed
+23/−22 lines, 4 filesdep ~QuickCheckdep ~basedep ~quickcheck-instancesPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: QuickCheck, base, quickcheck-instances, semigroups, tasty-quickcheck, time
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- binary-orphans.cabal +9/−9
- src/Data/Binary/Orphans.hs +10/−0
- test/Tests.hs +0/−13
CHANGELOG.md view
@@ -1,3 +1,7 @@+- 0.1.7.0+ - GHC-8.2 support+ - `SystemTime` instance (`time-1.8`)+ - 0.1.6.0 - Add instance for `hashed` in `hashable >=1.2.5.0`
binary-orphans.cabal view
@@ -1,5 +1,5 @@ name: binary-orphans-version: 0.1.6.0+version: 0.1.7.0 synopsis: Orphan instances for binary description: `binary-orphans` defines orphan instances for types in some popular packages. category: Web@@ -9,7 +9,7 @@ maintainer: Oleg Grenrus <oleg.grenrus@iki.fi> license: BSD3 license-file: LICENSE-tested-with: GHC==7.6.3, GHC==7.8.4, GHC==7.10.2+tested-with: GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.1 build-type: Simple cabal-version: >= 1.10 @@ -26,15 +26,15 @@ src ghc-options: -Wall -fno-warn-orphans build-depends:- base >=4.6.0.1 && <4.10- , aeson >=0.7.0.6 && <1.2- , binary >=0.5.1.1 && <0.8.5+ base >=4.6.0.1 && <4.11+ , aeson >=0.7.0.6 && <1.3+ , binary >=0.5.1.1 && <0.8.6 || ==0.9.0.0 , case-insensitive >=1.2.0.4 && <1.2.1 , hashable >=1.2.3.3 && <1.3 , scientific >=0.3.3.8 && <0.4 , tagged >=0.7.3 && <0.8.6 , text >=1.2.0.6 && <1.3- , time >=1.4.0.1 && <1.6.1+ , time >=1.4.0.1 && <1.9 , unordered-containers >=0.2.5.1 && <0.3 , vector >=0.10.12.3 && <0.13 , text-binary >=0.1.0 && <0.3@@ -69,10 +69,10 @@ , unordered-containers , vector , binary-orphans- , QuickCheck >=2.7 && <2.9.3- , quickcheck-instances >=0.3.11 && <0.3.13+ , QuickCheck >=2.10 && <2.11+ , quickcheck-instances >=0.3.16 && <0.4 , tasty >=0.10.1.2 && <0.12- , tasty-quickcheck >=0.8.3.2 && <0.9+ , tasty-quickcheck >=0.8.3.2 && <0.10 if !impl(ghc >= 8.0) build-depends: semigroups >=0.16.2.2 && <0.18.3
src/Data/Binary/Orphans.hs view
@@ -62,6 +62,10 @@ import qualified Data.Scientific as S #endif +#if MIN_VERSION_time(1,8,0)+import qualified Data.Time.Clock.System as Time+#endif+ instance Binary A.Value where get = do t <- get :: Get Int@@ -160,6 +164,12 @@ get = fmap (flip Time.addAbsoluteTime Time.taiEpoch) get put = put . flip Time.diffAbsoluteTime Time.taiEpoch +#if MIN_VERSION_time(1,8,0)+-- | /Since: binary-orphans-0.1.7.0/+instance Binary Time.SystemTime where+ get = liftM2 Time.MkSystemTime get get+ put (Time.MkSystemTime s ns) = put s >> put ns+#endif #if !MIN_VERSION_binary(0,8,4)
test/Tests.hs view
@@ -42,16 +42,3 @@ roundtrip :: (Eq a, Show a, Binary a) => Proxy a -> a -> Property roundtrip _ x = x === decode (encode x)--instance (CI.FoldCase a, Arbitrary a) => Arbitrary (CI a) where- arbitrary = fmap CI.mk arbitrary--instance Arbitrary a => Arbitrary (Min a) where- arbitrary = fmap Min arbitrary- shrink = fmap Min . shrink . getMin--#if !MIN_VERSION_QuickCheck(2,9,0)-instance Arbitrary a => Arbitrary (Sum a) where- arbitrary = fmap Sum arbitrary- shrink = fmap Sum . shrink . getSum-#endif