binary-orphans 1.0.3 → 1.0.4
raw patch · 4 files changed
+20/−8 lines, 4 filesdep +data-array-bytePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies added: data-array-byte
API changes (from Hackage documentation)
- Data.Binary.Orphans: instance Data.Binary.Class.Binary a => Data.Binary.Class.Binary (Data.Tuple.Solo.Solo a)
+ Data.Binary.Orphans: instance Data.Binary.Class.Binary Data.Array.Byte.ByteArray
+ Data.Binary.Orphans: instance Data.Binary.Class.Binary a => Data.Binary.Class.Binary (Solo a)
Files
- CHANGELOG.md +4/−0
- binary-orphans.cabal +10/−4
- src/Data/Binary/Orphans.hs +4/−2
- test/Tests.hs +2/−2
CHANGELOG.md view
@@ -1,3 +1,7 @@+# 1.0.4++- Depend on `data-byte-array` to provide `Data.Array.Byte` instance+ # 1.0.3 - Add `ByteArray` (from `Data.Array.Byte` instance)
binary-orphans.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.12 name: binary-orphans-version: 1.0.3+version: 1.0.4 synopsis: Compatibility package for binary; provides instances category: Data, Binary, Parsing, Compatibility description:@@ -24,10 +24,10 @@ || ==8.4.4 || ==8.6.5 || ==8.8.4- || ==8.10.4+ || ==8.10.7 || ==9.0.2- || ==9.2.4- || ==9.4.1+ || ==9.2.7+ || ==9.4.4 extra-source-files: CHANGELOG.md @@ -57,6 +57,9 @@ if !impl(ghc >=9.2) build-depends: OneTuple >=0.3 && <0.4 + if impl(ghc >=8.0 && <9.4)+ build-depends: data-array-byte >=0.1.0.1 && <0.2+ test-suite binary-orphans-test default-language: Haskell2010 type: exitcode-stdio-1.0@@ -81,3 +84,6 @@ build-depends: nats , void++ if impl(ghc >=8.0 && <9.4)+ build-depends: data-array-byte
src/Data/Binary/Orphans.hs view
@@ -37,7 +37,7 @@ import Data.Tuple.Solo (Solo (..)) #endif -#if MIN_VERSION_base(4,17,0)+#if MIN_VERSION_base(4,9,0) import Data.Array.Byte (ByteArray (..), MutableByteArray (..)) import GHC.Exts (Int (..), indexWord8Array#, newByteArray#, sizeofByteArray#,@@ -346,11 +346,13 @@ -- future-binary ------------------------------------------------------------------------------- +-- | @since 1.0.2 instance Binary a => Binary (Solo a) where put (Solo x) = put x get = fmap Solo get -#if MIN_VERSION_base(4,17,0)+#if MIN_VERSION_base(4,9,0)+-- | @since 1.0.3 instance Binary ByteArray where put ba = put maxI >> go 0 where
test/Tests.hs view
@@ -13,7 +13,7 @@ import Test.Tasty (TestTree, defaultMain, testGroup) import Test.Tasty.QuickCheck (testProperty) -#if MIN_VERSION_base(4,17,0)+#if MIN_VERSION_base(4,9,0) import Data.Array.Byte (ByteArray) #endif @@ -26,7 +26,7 @@ , testProperty "Sum Int" $ roundtrip (Proxy :: Proxy (Sum Int)) , testProperty "Min Int" $ roundtrip (Proxy :: Proxy (Min Int)) , testProperty "Solo Int" $ roundtrip (Proxy :: Proxy (Solo Int))-#if MIN_VERSION_base(4,17,0)+#if MIN_VERSION_base(4,9,0) , testProperty "ByteArray" $ roundtrip (Proxy :: Proxy ByteArray) #endif ]