Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ghc-serialise for openSUSE:Factory checked in at 2021-11-11 21:36:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-serialise (Old) and /work/SRC/openSUSE:Factory/.ghc-serialise.new.1890 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-serialise" Thu Nov 11 21:36:54 2021 rev:6 rq:930356 version:0.2.4.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-serialise/ghc-serialise.changes 2021-03-28 11:57:53.972305622 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-serialise.new.1890/ghc-serialise.changes 2021-11-11 21:37:16.868926247 +0100 @@ -1,0 +2,10 @@ +Mon Nov 1 08:27:02 UTC 2021 - [email protected] + +- Update serialise to version 0.2.4.0. + ## 0.2.4.0 -- 2021-10-31 + + * Add instances for `Data.Void`, `strict`, and `these`. + + * Compatibility with GHC 9.0 and 9.2 + +------------------------------------------------------------------- Old: ---- serialise-0.2.3.0.tar.gz serialise.cabal New: ---- serialise-0.2.4.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-serialise.spec ++++++ --- /var/tmp/diff_new_pack.fRdmmt/_old 2021-11-11 21:37:17.408926641 +0100 +++ /var/tmp/diff_new_pack.fRdmmt/_new 2021-11-11 21:37:17.408926641 +0100 @@ -19,13 +19,12 @@ %global pkg_name serialise %bcond_with tests Name: ghc-%{pkg_name} -Version: 0.2.3.0 +Version: 0.2.4.0 Release: 0 Summary: A binary serialisation library for Haskell values License: BSD-3-Clause URL: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz -Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/2.cabal#/%{pkg_name}.cabal BuildRequires: ghc-Cabal-devel BuildRequires: ghc-array-devel BuildRequires: ghc-bytestring-devel @@ -35,7 +34,9 @@ BuildRequires: ghc-hashable-devel BuildRequires: ghc-primitive-devel BuildRequires: ghc-rpm-macros +BuildRequires: ghc-strict-devel BuildRequires: ghc-text-devel +BuildRequires: ghc-these-devel BuildRequires: ghc-time-devel BuildRequires: ghc-unordered-containers-devel BuildRequires: ghc-vector-devel @@ -78,7 +79,6 @@ %prep %autosetup -n %{pkg_name}-%{version} -cp -p %{SOURCE1} %{pkg_name}.cabal %build %ghc_lib_build ++++++ serialise-0.2.3.0.tar.gz -> serialise-0.2.4.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/serialise-0.2.3.0/ChangeLog.md new/serialise-0.2.4.0/ChangeLog.md --- old/serialise-0.2.3.0/ChangeLog.md 2001-09-09 03:46:40.000000000 +0200 +++ new/serialise-0.2.4.0/ChangeLog.md 2001-09-09 03:46:40.000000000 +0200 @@ -1,5 +1,11 @@ # Revision history for serialise +## 0.2.4.0 -- 2021-10-31 + +* Add instances for `Data.Void`, `strict`, and `these`. + +* Compatibility with GHC 9.0 and 9.2 + ## 0.2.3.0 -- 2020-05-10 * Bounds bumps and GHC 8.10 compatibility diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/serialise-0.2.3.0/serialise.cabal new/serialise-0.2.4.0/serialise.cabal --- old/serialise-0.2.3.0/serialise.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/serialise-0.2.4.0/serialise.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -1,5 +1,5 @@ name: serialise -version: 0.2.3.0 +version: 0.2.4.0 synopsis: A binary serialisation library for Haskell values. description: This package (formerly @binary-serialise-cbor@) provides pure, efficient @@ -30,7 +30,13 @@ category: Codec build-type: Simple tested-with: - GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.3, GHC == 8.10.1 + GHC == 8.0.2, + GHC == 8.2.2, + GHC == 8.4.4, + GHC == 8.6.5, + GHC == 8.8.3, + GHC == 8.10.1, + GHC == 9.0.1 extra-source-files: ChangeLog.md @@ -64,21 +70,23 @@ build-depends: array >= 0.4 && < 0.6, - base >= 4.7 && < 4.15, - bytestring >= 0.10.4 && < 0.11, + base >= 4.7 && < 4.17, + bytestring >= 0.10.4 && < 0.12, cborg == 0.2.*, containers >= 0.5 && < 0.7, - ghc-prim >= 0.3.1.0 && < 0.7, + ghc-prim >= 0.3.1.0 && < 0.9, half >= 0.2.2.3 && < 0.4, hashable >= 1.2 && < 2.0, primitive >= 0.5 && < 0.8, + strict >= 0.4 && < 0.5, text >= 1.1 && < 1.3, + these >= 1.1 && < 1.2, unordered-containers >= 0.2 && < 0.3, vector >= 0.10 && < 0.13 if flag(newtime15) build-depends: - time >= 1.5 && < 1.11 + time >= 1.5 && < 1.14 else build-depends: time >= 1.4 && < 1.5, @@ -116,19 +124,19 @@ Tests.GeneralisedUTF8 build-depends: - base >= 4.7 && < 4.15, - bytestring >= 0.10.4 && < 0.11, + base >= 4.7 && < 4.17, + bytestring >= 0.10.4 && < 0.12, directory >= 1.0 && < 1.4, filepath >= 1.0 && < 1.5, text >= 1.1 && < 1.3, - time >= 1.4 && < 1.11, + time >= 1.4 && < 1.14, containers >= 0.5 && < 0.7, unordered-containers >= 0.2 && < 0.3, primitive >= 0.5 && < 0.8, cborg, serialise, QuickCheck >= 2.9 && < 2.15, - tasty >= 0.11 && < 1.4, + tasty >= 0.11 && < 1.5, tasty-hunit >= 0.9 && < 0.11, tasty-quickcheck >= 0.8 && < 0.11, quickcheck-instances >= 0.3.12 && < 0.4, @@ -153,9 +161,9 @@ Instances.Time build-depends: - base >= 4.7 && < 4.15, + base >= 4.7 && < 4.17, binary >= 0.7 && < 0.11, - bytestring >= 0.10.4 && < 0.11, + bytestring >= 0.10.4 && < 0.12, vector >= 0.10 && < 0.13, cborg, serialise, @@ -165,7 +173,7 @@ if flag(newtime15) build-depends: - time >= 1.5 && < 1.11 + time >= 1.5 && < 1.14 else build-depends: time >= 1.4 && < 1.5, @@ -197,15 +205,15 @@ SimpleVersus build-depends: - base >= 4.7 && < 4.15, + base >= 4.7 && < 4.17, binary >= 0.7 && < 0.11, - bytestring >= 0.10.4 && < 0.11, - ghc-prim >= 0.3.1.0 && < 0.7, + bytestring >= 0.10.4 && < 0.12, + ghc-prim >= 0.3.1.0 && < 0.9, vector >= 0.10 && < 0.13, cborg, serialise, - aeson >= 0.7 && < 1.5, + aeson >= 0.7 && < 2.1, deepseq >= 1.0 && < 1.5, criterion >= 1.0 && < 1.6, cereal >= 0.5.2.0 && < 0.6, @@ -244,11 +252,11 @@ build-depends: array >= 0.4 && < 0.6, - base >= 4.7 && < 4.15, + base >= 4.7 && < 4.17, binary >= 0.7 && < 0.11, - bytestring >= 0.10.4 && < 0.11, + bytestring >= 0.10.4 && < 0.12, directory >= 1.0 && < 1.4, - ghc-prim >= 0.3.1.0 && < 0.7, + ghc-prim >= 0.3.1.0 && < 0.9, fail >= 4.9.0.0 && < 4.10, text >= 1.1 && < 1.3, vector >= 0.10 && < 0.13, @@ -258,7 +266,7 @@ filepath >= 1.0 && < 1.5, containers >= 0.5 && < 0.7, deepseq >= 1.0 && < 1.5, - aeson >= 0.7 && < 1.5, + aeson >= 0.7 && < 2.1, cereal >= 0.5.2.0 && < 0.6, half >= 0.2.2.3 && < 0.4, tar >= 0.4 && < 0.6, @@ -270,7 +278,7 @@ if flag(newtime15) build-depends: - time >= 1.5 && < 1.11 + time >= 1.5 && < 1.14 else build-depends: time >= 1.4 && < 1.5, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/serialise-0.2.3.0/src/Codec/Serialise/Class.hs new/serialise-0.2.4.0/src/Codec/Serialise/Class.hs --- old/serialise-0.2.3.0/src/Codec/Serialise/Class.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/serialise-0.2.4.0/src/Codec/Serialise/Class.hs 2001-09-09 03:46:40.000000000 +0200 @@ -51,6 +51,7 @@ #if MIN_VERSION_base(4,8,0) import Numeric.Natural import Data.Functor.Identity +import Data.Void (Void, absurd) #endif #if MIN_VERSION_base(4,9,0) @@ -70,10 +71,12 @@ import qualified Data.Map as Map import qualified Data.Sequence as Sequence import qualified Data.Set as Set +import qualified Data.Strict as Strict import qualified Data.IntSet as IntSet import qualified Data.IntMap as IntMap import qualified Data.HashSet as HashSet import qualified Data.HashMap.Strict as HashMap +import qualified Data.These as These import qualified Data.Tree as Tree import qualified Data.Primitive.ByteArray as Prim import qualified Data.Vector as Vector @@ -99,6 +102,9 @@ import Prelude hiding (decodeFloat, encodeFloat, foldr) import qualified Prelude +#if MIN_VERSION_base(4,16,0) +import GHC.Exts (Levity(..)) +#endif #if MIN_VERSION_base(4,10,0) import Type.Reflection import Type.Reflection.Unsafe @@ -204,6 +210,13 @@ -------------------------------------------------------------------------------- -- Primitive and integral instances +#if MIN_VERSION_base(4,8,0) +-- | @since 0.2.4.0 +instance Serialise Void where + encode = absurd + decode = fail "tried to decode void" +#endif + -- | @since 0.2.0.0 instance Serialise () where encode = const encodeNull @@ -530,10 +543,12 @@ encode = encode . Semigroup.getLast decode = fmap Semigroup.Last decode +#if !MIN_VERSION_base(4,16,0) -- | @since 0.2.0.0 instance Serialise a => Serialise (Semigroup.Option a) where encode = encode . Semigroup.getOption decode = fmap Semigroup.Option decode +#endif instance Serialise a => Serialise (Semigroup.WrappedMonoid a) where encode = encode . Semigroup.unwrapMonoid @@ -850,6 +865,44 @@ return (Right x) _ -> fail "unknown tag" +-- | @since 0.2.4.0 +instance (Serialise a, Serialise b) => Serialise (These.These a b) where + encode (These.This x) = encodeListLen 2 <> encodeWord 0 <> encode x + encode (These.That x) = encodeListLen 2 <> encodeWord 1 <> encode x + encode (These.These x y) = encodeListLen 3 <> encodeWord 2 <> encode x <> encode y + + decode = do n <- decodeListLen + t <- decodeWord + case (t, n) of + (0, 2) -> do !x <- decode + return (These.This x) + (1, 2) -> do !x <- decode + return (These.That x) + (2, 3) -> do !x <- decode + !y <- decode + return (These.These x y) + _ -> fail "unknown tag" + +-- | @since 0.2.4.0 +instance (Serialise a, Serialise b) => Serialise (Strict.Pair a b) where + encode = encode . Strict.toLazy + decode = Strict.toStrict <$> decode + +-- | @since 0.2.4.0 +instance Serialise a => Serialise (Strict.Maybe a) where + encode = encode . Strict.toLazy + decode = Strict.toStrict <$> decode + +-- | @since 0.2.4.0 +instance (Serialise a, Serialise b) => Serialise (Strict.Either a b) where + encode = encode . Strict.toLazy + decode = Strict.toStrict <$> decode + +-- | @since 0.2.4.0 +instance (Serialise a, Serialise b) => Serialise (Strict.These a b) where + encode = encode . Strict.toLazy + decode = Strict.toStrict <$> decode + -------------------------------------------------------------------------------- -- Container instances @@ -1136,6 +1189,15 @@ decodeListLenOf 1 toEnum . fromIntegral <$> decodeWord +#if MIN_VERSION_base(4,16,0) +-- | @since 0.2.6.0 +instance Serialise Levity where + encode lev = encodeListLen 1 <> encodeWord (fromIntegral $ fromEnum lev) + decode = do + decodeListLenOf 1 + toEnum . fromIntegral <$> decodeWord +#endif + -- | @since 0.2.0.0 instance Serialise RuntimeRep where encode rr = @@ -1143,8 +1205,12 @@ VecRep a b -> encodeListLen 3 <> encodeWord 0 <> encode a <> encode b TupleRep reps -> encodeListLen 2 <> encodeWord 1 <> encode reps SumRep reps -> encodeListLen 2 <> encodeWord 2 <> encode reps +#if MIN_VERSION_base(4,16,0) + BoxedRep lev -> encodeListLen 2 <> encodeWord 3 <> encode lev +#else LiftedRep -> encodeListLen 1 <> encodeWord 3 UnliftedRep -> encodeListLen 1 <> encodeWord 4 +#endif IntRep -> encodeListLen 1 <> encodeWord 5 WordRep -> encodeListLen 1 <> encodeWord 6 Int64Rep -> encodeListLen 1 <> encodeWord 7 @@ -1170,8 +1236,12 @@ 0 | len == 3 -> VecRep <$> decode <*> decode 1 | len == 2 -> TupleRep <$> decode 2 | len == 2 -> SumRep <$> decode +#if MIN_VERSION_base(4,16,0) + 3 | len == 2 -> BoxedRep <$> decode +#else 3 | len == 1 -> pure LiftedRep 4 | len == 1 -> pure UnliftedRep +#endif 5 | len == 1 -> pure IntRep 6 | len == 1 -> pure WordRep 7 | len == 1 -> pure Int64Rep @@ -1221,12 +1291,18 @@ <> case n of TypeLitSymbol -> encodeWord 0 TypeLitNat -> encodeWord 1 +#if MIN_VERSION_base(4,16,0) + TypeLitChar -> encodeWord 2 +#endif decode = do decodeListLenOf 1 tag <- decodeWord case tag of 0 -> pure TypeLitSymbol 1 -> pure TypeLitNat +#if MIN_VERSION_base(4,16,0) + 2 -> pure TypeLitChar +#endif _ -> fail "Data.Serialise.Binary.CBOR.putTypeLitSort: invalid tag" decodeSomeTypeRep :: Decoder s SomeTypeRep diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/serialise-0.2.3.0/tests/Tests/Serialise.hs new/serialise-0.2.4.0/tests/Tests/Serialise.hs --- old/serialise-0.2.3.0/tests/Tests/Serialise.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/serialise-0.2.4.0/tests/Tests/Serialise.hs 2001-09-09 03:46:40.000000000 +0200 @@ -190,7 +190,9 @@ , mkTest (T :: T (Semigroup.Max ())) , mkTest (T :: T (Semigroup.First ())) , mkTest (T :: T (Semigroup.Last ())) +#if !MIN_VERSION_base(4,16,0) , mkTest (T :: T (Semigroup.Option ())) +#endif , mkTest (T :: T (Semigroup.WrappedMonoid ())) #endif #if MIN_VERSION_base(4,7,0)
