Accepting request 1157232 from devel:languages:haskell

Update Haskell ecosystem to GHC version 9.8.2.

OBS-URL: https://build.opensuse.org/request/show/1157232
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ghc-aeson?expand=0&rev=44
This commit is contained in:
Dominique Leuenberger 2024-03-20 20:13:52 +00:00 committed by Git OBS Bridge
commit e593a61807
5 changed files with 161 additions and 79 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5d4042b903ce181ee023bbf908f37a3f55e820c5f0df102683b87f963e3522c6
size 335908

3
aeson-2.2.1.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:914eefd0e80d12db5c721daa2cbab427acee39795f125c5460c1fe48cf9a5d7f
size 341038

View File

@ -1,6 +1,6 @@
name: aeson
version: 2.1.2.1
x-revision: 3
version: 2.2.1.0
x-revision: 1
license: BSD3
license-file: LICENSE
category: Text, Web, JSON
@ -12,19 +12,19 @@ author: Bryan O'Sullivan <bos@serpentine.com>
maintainer: Adam Bergmark <adam@bergmark.nl>
stability: experimental
tested-with:
GHC ==8.0.2
|| ==8.2.2
GHC ==8.2.2
|| ==8.4.4
|| ==8.6.5
|| ==8.8.4
|| ==8.10.7
|| ==9.0.2
|| ==9.2.7
|| ==9.4.4
|| ==9.6.1
|| ==9.2.8
|| ==9.4.7
|| ==9.6.3
|| ==9.8.1
synopsis: Fast JSON parsing and encoding
cabal-version: >=1.10
cabal-version: 1.12
homepage: https://github.com/haskell/aeson
bug-reports: https://github.com/haskell/aeson/issues
build-type: Simple
@ -40,24 +40,14 @@ description:
extra-source-files:
*.yaml
benchmarks/json-data/*.json
cbits/*.c
changelog.md
README.markdown
src-ffi/Data/Aeson/Parser/*.hs
src-pure/Data/Aeson/Parser/*.hs
tests/golden/*.expected
tests/JSONTestSuite/results/*.tok
tests/JSONTestSuite/results/*.txt
tests/JSONTestSuite/test_parsing/*.json
tests/JSONTestSuite/test_transform/*.json
flag cffi
description:
Controls whether to include c-ffi bits or pure haskell. Default to False for security.
default: False
manual: True
flag ordered-keymap
description: Use ordered @Data.Map.Strict@ for KeyMap implementation.
default: True
@ -65,100 +55,96 @@ flag ordered-keymap
library
default-language: Haskell2010
hs-source-dirs: src attoparsec-iso8601/src
hs-source-dirs: src
exposed-modules:
Data.Aeson
Data.Aeson.Decoding
Data.Aeson.Decoding.ByteString
Data.Aeson.Decoding.ByteString.Lazy
Data.Aeson.Decoding.Text
Data.Aeson.Decoding.Tokens
Data.Aeson.Encoding
Data.Aeson.Encoding.Internal
Data.Aeson.Internal
Data.Aeson.Internal.Time
Data.Aeson.Key
Data.Aeson.KeyMap
Data.Aeson.Parser
Data.Aeson.Parser.Internal
Data.Aeson.QQ.Simple
Data.Aeson.RFC8785
Data.Aeson.Text
Data.Aeson.TH
Data.Aeson.Types
other-modules:
Data.Aeson.Decoding.Conversion
Data.Aeson.Decoding.Internal
Data.Aeson.Encoding.Builder
Data.Aeson.Internal.ByteString
Data.Aeson.Internal.Functions
Data.Aeson.Internal.Integer
Data.Aeson.Internal.Prelude
Data.Aeson.Internal.Scientific
Data.Aeson.Internal.Text
Data.Aeson.Internal.TH
Data.Aeson.Internal.Unescape
Data.Aeson.Internal.UnescapeFromText
Data.Aeson.Internal.Word8
Data.Aeson.Internal.Word16
Data.Aeson.Parser.Time
Data.Aeson.Parser.Unescape
Data.Aeson.Types.Class
Data.Aeson.Types.FromJSON
Data.Aeson.Types.Generic
Data.Aeson.Types.Internal
Data.Aeson.Types.ToJSON
Data.Attoparsec.Time
Data.Attoparsec.Time.Internal
-- GHC bundled libs
build-depends:
base >=4.9.0.0 && <5
, bytestring >=0.10.8.1 && <0.12
, containers >=0.5.7.1 && <0.7
, deepseq >=1.4.2.0 && <1.5
base >=4.10.0.0 && <5
, bytestring >=0.10.8.2 && <0.13
, containers >=0.5.10.2 && <0.7
, deepseq >=1.4.3.0 && <1.6
, exceptions >=0.10.4 && <0.11
, ghc-prim >=0.5.0.0 && <0.11
, template-haskell >=2.11.0.0 && <2.21
, text >=1.2.3.0 && <1.3 || >=2.0 && <2.1
, time >=1.6.0.1 && <1.13
, ghc-prim >=0.5.0.0 && <0.12
, template-haskell >=2.12.0.0 && <2.22
, text >=1.2.3.0 && <1.3 || >=2.0 && <2.2
, time >=1.8.0.2 && <1.13
-- Compat
build-depends:
base-compat-batteries >=0.10.0 && <0.14
, generically >=0.1 && <0.2
, time-compat >=1.9.6 && <1.10
generically >=0.1 && <0.2
, time-compat >=1.9.6 && <1.10
if !impl(ghc >=8.6)
build-depends: contravariant >=1.4.1 && <1.6
if !impl(ghc >=9.0)
build-depends: integer-gmp
-- Other dependencies
build-depends:
attoparsec >=0.14.2 && <0.15
, data-fix >=0.3.2 && <0.4
, dlist >=0.8.0.4 && <1.1
, hashable >=1.3.5.0 && <1.5
data-fix >=0.3.2 && <0.4
, dlist >=1.0 && <1.1
, hashable >=1.4.2.0 && <1.5
, indexed-traversable >=0.1.2 && <0.2
, OneTuple >=0.3.1 && <0.5
, primitive >=0.7.3.0 && <0.9
, QuickCheck >=2.14.2 && <2.15
, integer-conversion >=0.1 && <0.2
, integer-logarithms >=1.0.3.1 && <1.1
, network-uri >=2.6.4.1 && <2.7
, OneTuple >=0.4.1.1 && <0.5
, primitive >=0.8.0.0 && <0.10
, QuickCheck >=2.14.3 && <2.15
, scientific >=0.3.7.0 && <0.4
, semialign >=1.2 && <1.4
, strict >=0.4 && <0.6
, tagged >=0.8.6 && <0.9
, semialign >=1.3 && <1.4
, strict >=0.5 && <0.6
, tagged >=0.8.7 && <0.9
, text-iso8601 >=0.1 && <0.2
, text-short >=0.1.5 && <0.2
, th-abstraction >=0.3.0.0 && <0.6
, these >=1.1.1.1 && <1.3
, th-abstraction >=0.5.0.0 && <0.7
, these >=1.2 && <1.3
, unordered-containers >=0.2.10.0 && <0.3
, uuid-types >=1.0.5 && <1.1
, vector >=0.12.0.1 && <0.14
, vector >=0.13.0.0 && <0.14
, witherable >=0.4.2 && <0.5
ghc-options: -Wall
if (impl(ghcjs) || !flag(cffi))
hs-source-dirs: src-pure
other-modules: Data.Aeson.Parser.UnescapePure
else
c-sources: cbits/unescape_string.c
cpp-options: -DCFFI
hs-source-dirs: src-ffi
other-modules: Data.Aeson.Parser.UnescapeFFI
build-depends: text <2.0
-- String unescaping
if flag(ordered-keymap)
cpp-options: -DUSE_ORDEREDMAP=1
@ -170,10 +156,12 @@ test-suite aeson-tests
main-is: Tests.hs
ghc-options: -Wall -threaded -rtsopts
other-modules:
CastFloat
DataFamilies.Encoders
DataFamilies.Instances
DataFamilies.Properties
DataFamilies.Types
DoubleToScientific
Encoders
ErrorMessages
Functions
@ -188,36 +176,53 @@ test-suite aeson-tests
PropertyRTFunctors
PropertyTH
PropUtils
Regression.Issue351
Regression.Issue571
Regression.Issue687
Regression.Issue967
RFC8785
SerializationFormatSpec
Types
UnitTests
UnitTests.FromJSONKey
UnitTests.Hashable
UnitTests.KeyMapInsertWith
UnitTests.MonadFix
UnitTests.NoThunks
UnitTests.NullaryConstructors
UnitTests.OmitNothingFieldsNote
UnitTests.OptionalFields
UnitTests.OptionalFields.Common
UnitTests.OptionalFields.Generics
UnitTests.OptionalFields.Manual
UnitTests.OptionalFields.TH
UnitTests.UTCTime
build-depends:
aeson
, attoparsec
, base
, base-compat
, base-orphans >=0.5.3 && <0.10
, base-orphans >=0.5.3 && <0.10
, base16-bytestring
, bytestring
, containers
, data-fix
, Diff >=0.4 && <0.5
, deepseq
, Diff >=0.4 && <0.5
, directory
, dlist
, filepath
, generic-deriving >=1.10 && <1.15
, generic-deriving >=1.10 && <1.15
, generically
, ghc-prim >=0.2
, hashable
, indexed-traversable
, integer-logarithms >=1 && <1.1
, integer-logarithms >=1 && <1.1
, network-uri
, OneTuple
, primitive
, QuickCheck >=2.14.2 && <2.15
, quickcheck-instances >=0.3.29 && <0.4
, QuickCheck >=2.14.2 && <2.15
, quickcheck-instances >=0.3.29 && <0.4
, scientific
, strict
, tagged
@ -235,6 +240,12 @@ test-suite aeson-tests
, uuid-types
, vector
if !impl(ghc >=9.0)
build-depends: integer-gmp
if impl(ghc >=9.2 && <9.7)
build-depends: nothunks >=0.1.4 && <0.2
source-repository head
type: git
location: git://github.com/haskell/aeson.git

View File

@ -1,3 +1,72 @@
-------------------------------------------------------------------
Mon Oct 16 15:54:05 UTC 2023 - Peter Simons <psimons@suse.com>
- Update aeson to version 2.2.1.0 revision 1.
### 2.2.1.0
* Add `Data.Aeson.RFC8785`, a JSON Canonicalization Scheme implementation
https://datatracker.ietf.org/doc/html/rfc8785
* Add Data.Aeson.Decoding.Text, decodeStrictText :: Text -> ...
We avoid intermediate `ByteString` copy by not doing
`decode . TE.encodeUtf8`, but instead working on `Text` value directly.
As we know that the stream is valid Unicode (UTF8 or UTF16),
we can also take some shortcuts.
One gotcha is that internal `Text` values (in `Key`s or `Value` `String`s)
will most likely retain the original input `Text` value (its underlying `Array`).
It shouldn't be an issue if the `Value` is then decoded to something else so these
`Text` values disapper, but if not (e.g. `Object` keys survive)
then users might want to use `Data.Text.copy`.
### 2.2.0.0
* Rework how `omitNothingFields` works. Add `allowOmittedFields` as a parsing counterpart.
New type-class members were added: `omitField :: a -> Bool` to `ToJSON` and `omittedField :: Maybe a` to `FromJSON`.
These control which fields can be omitted.
The `.:?=`, `.:!=` and `.?=` operators were added to make use of these new members.
GHC.Generics and Template Haskell deriving has been updated accordingly.
Note: They behave as the parsers have been written with `.:!=`, i.e.
if the field value is `null` it's passed to the underlying parser.
This doesn't make difference for `Maybe` or `Option`, but does make for
types which parser doesn't accept `null`.
(`()` parser accepts everything and `Proxy` accepts `null).
In addition to `Maybe` (and `Option`) fields the `Data.Monoid.First` and `Data.Monoid.Last` are also omitted,
as well as the most newtype wrappers, when their wrap omittable type (e.g. newtypes in `Data.Monoid` and `Data.Semigroup`, `Identity`, `Const`, `Tagged`, `Compose`).
Additionall "boring" types like `()` and `Proxy` are omitted as well.
As the omitting is now uniform, type arguments are also omitted (also in `Generic1` derived instance).
Resolves issues:
- [#687](https://github.com/haskell/aeson/issues/687) Derived ToJSON1 instance does not respect omitNothingFields = True,
- [#571](https://github.com/haskell/aeson/issues/571) omitNothingFields not used in Generic Decode,
- [#792](https://github.com/haskell/aeson/issues/792) Make Proxy fields optional.
* Use `Data.Aeson.Decoding` parsing functions (introduced in version 2.1.2.0) as default in `Data.Aeson`.
As one side-effect, `decode` and `decode'` etc pair functions are operationally the same.
All variants use an intermediate `Value` in normal form.
The lazier variant could had `Value` thunks inside `Array` (i.e. `Vector`), but the record had been value strict since version `0.4.0.0` (before that the lazy `Data.Map` was used as `Object`).
* Move `Data.Aeson.Parser` module into separate [`attoparsec-aeson`](https://hackage.haskell.org/package/attoparsec-aeson) package, as these parsers are not used by `aeson` itself anymore.
* Use [`text-iso8601`](https://hackage.haskell.org/package/text-iso8601) package for parsing `time` types. These are slightly faster than previously used (copy of) `attoparsec-iso8601`.
Formats accepted is slightly changed:
- The space between time and timezone offset (in `UTCTime` and `ZonedTime`) is disallowed. ISO8601 explictly forbidds it.
- The timezone offsets can be in range -23:59..23:59. This is how Python, joda-time etc seems to do. (Previously the range was -12..+14)
* Remove internal `Data.Aeson.Internal` and `Data.Aeson.Internal.Time` modules. Everything from the former is exported elsewhere (`Data.Aeson.Types`), the latter was truly internal.
* Remove `cffi` flag. Toggling the flag made `aeson` use a C implementation for string unescaping (used for `text <2` versions).
The new native Haskell implementation (introduced in version 2.0.3.0) is at least as fast.
* Drop instances for `Number` from `attoparsec` package.
* Improve `Arbitrary Value` instance.
* Add instances for `URI` from `network-uri`.
* add instances for `Down` from `Data.Ord`.
* Use `integer-conversion` for converting `Text` and `ByteString`s into `Integer`s.
* Bump lower bounds of non GHC-boot lib dependencies.
-------------------------------------------------------------------
Tue Aug 22 09:29:21 UTC 2023 - Peter Simons <psimons@suse.com>

View File

@ -20,22 +20,18 @@
%global pkgver %{pkg_name}-%{version}
%bcond_with tests
Name: ghc-%{pkg_name}
Version: 2.1.2.1
Version: 2.2.1.0
Release: 0
Summary: Fast JSON parsing and encoding
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/3.cabal#/%{pkg_name}.cabal
Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal#/%{pkg_name}.cabal
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-OneTuple-devel
BuildRequires: ghc-OneTuple-prof
BuildRequires: ghc-QuickCheck-devel
BuildRequires: ghc-QuickCheck-prof
BuildRequires: ghc-attoparsec-devel
BuildRequires: ghc-attoparsec-prof
BuildRequires: ghc-base-compat-batteries-devel
BuildRequires: ghc-base-compat-batteries-prof
BuildRequires: ghc-base-devel
BuildRequires: ghc-base-prof
BuildRequires: ghc-bytestring-devel
@ -56,6 +52,12 @@ BuildRequires: ghc-hashable-devel
BuildRequires: ghc-hashable-prof
BuildRequires: ghc-indexed-traversable-devel
BuildRequires: ghc-indexed-traversable-prof
BuildRequires: ghc-integer-conversion-devel
BuildRequires: ghc-integer-conversion-prof
BuildRequires: ghc-integer-logarithms-devel
BuildRequires: ghc-integer-logarithms-prof
BuildRequires: ghc-network-uri-devel
BuildRequires: ghc-network-uri-prof
BuildRequires: ghc-primitive-devel
BuildRequires: ghc-primitive-prof
BuildRequires: ghc-rpm-macros
@ -70,6 +72,8 @@ BuildRequires: ghc-tagged-prof
BuildRequires: ghc-template-haskell-devel
BuildRequires: ghc-template-haskell-prof
BuildRequires: ghc-text-devel
BuildRequires: ghc-text-iso8601-devel
BuildRequires: ghc-text-iso8601-prof
BuildRequires: ghc-text-prof
BuildRequires: ghc-text-short-devel
BuildRequires: ghc-text-short-prof
@ -105,8 +109,6 @@ BuildRequires: ghc-filepath-devel
BuildRequires: ghc-filepath-prof
BuildRequires: ghc-generic-deriving-devel
BuildRequires: ghc-generic-deriving-prof
BuildRequires: ghc-integer-logarithms-devel
BuildRequires: ghc-integer-logarithms-prof
BuildRequires: ghc-quickcheck-instances-devel
BuildRequires: ghc-quickcheck-instances-prof
BuildRequires: ghc-tasty-devel