Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ghc-cassava for openSUSE:Factory checked in at 2025-06-11 16:26:50 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-cassava (Old) and /work/SRC/openSUSE:Factory/.ghc-cassava.new.19631 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-cassava" Wed Jun 11 16:26:50 2025 rev:19 rq:1284550 version:0.5.4.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-cassava/ghc-cassava.changes 2025-03-20 19:26:18.224891032 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-cassava.new.19631/ghc-cassava.changes 2025-06-11 16:28:33.889576430 +0200 @@ -1,0 +2,10 @@ +Tue Jun 10 06:10:51 UTC 2025 - Peter Simons <psim...@suse.com> + +- Update cassava to version 0.5.4.0. + ## Version 0.5.4.0 + + * Add `decodeWithP` and `decodeByNameWithP` to `Streaming` interface ([PR #237](https://github.com/haskell-hvr/cassava/pull/237)). + * Build tested with GHC 8.0 - 9.12.2. + * Functionality tested with GHC 8.4 - 9.12.2. + +------------------------------------------------------------------- Old: ---- cassava-0.5.3.2.tar.gz cassava.cabal New: ---- cassava-0.5.4.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-cassava.spec ++++++ --- /var/tmp/diff_new_pack.i2SrXc/_old 2025-06-11 16:28:35.649649851 +0200 +++ /var/tmp/diff_new_pack.i2SrXc/_new 2025-06-11 16:28:35.669650685 +0200 @@ -20,13 +20,12 @@ %global pkgver %{pkg_name}-%{version} %bcond_with tests Name: ghc-%{pkg_name} -Version: 0.5.3.2 +Version: 0.5.4.0 Release: 0 Summary: A CSV parsing and encoding library 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/1.cabal#/%{pkg_name}.cabal BuildRequires: ghc-Cabal-devel BuildRequires: ghc-Only-devel BuildRequires: ghc-Only-prof @@ -126,7 +125,6 @@ %prep %autosetup -n %{pkg_name}-%{version} -cp -p %{SOURCE1} %{pkg_name}.cabal %build %define cabal_configure_options -f-bytestring--lt-0_10_4 ++++++ cassava-0.5.3.2.tar.gz -> cassava-0.5.4.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cassava-0.5.3.2/CHANGES.md new/cassava-0.5.4.0/CHANGES.md --- old/cassava-0.5.3.2/CHANGES.md 2001-09-09 03:46:40.000000000 +0200 +++ new/cassava-0.5.4.0/CHANGES.md 2001-09-09 03:46:40.000000000 +0200 @@ -1,3 +1,9 @@ +## Version 0.5.4.0 + + * Add `decodeWithP` and `decodeByNameWithP` to `Streaming` interface ([PR #237](https://github.com/haskell-hvr/cassava/pull/237)). + * Build tested with GHC 8.0 - 9.12.2. + * Functionality tested with GHC 8.4 - 9.12.2. + ## Version 0.5.3.2 * Proper exception on hanging doublequote ([PR #222](https://github.com/haskell-hvr/cassava/pull/222)). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cassava-0.5.3.2/cassava.cabal new/cassava-0.5.4.0/cassava.cabal --- old/cassava-0.5.3.2/cassava.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/cassava-0.5.4.0/cassava.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -1,6 +1,6 @@ cabal-version: 1.12 Name: cassava -Version: 0.5.3.2 +Version: 0.5.4.0 Synopsis: A CSV parsing and encoding library Description: { @@ -43,9 +43,10 @@ CHANGES.md, README.md Tested-with: - GHC == 9.10.1 - GHC == 9.8.2 - GHC == 9.6.6 + GHC == 9.12.2 + GHC == 9.10.2 + GHC == 9.8.4 + GHC == 9.6.7 GHC == 9.4.8 GHC == 9.2.8 GHC == 9.0.2 @@ -102,7 +103,7 @@ , array >= 0.4 && < 0.6 , attoparsec >= 0.11.3.0 && < 0.15 , bytestring >= 0.10.4 && < 0.13 - , containers >= 0.4.2 && < 0.8 + , containers >= 0.4.2 && < 1 , deepseq >= 1.1 && < 1.6 , hashable < 2 , scientific >= 0.3.4.7 && < 0.4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cassava-0.5.3.2/src/Data/Csv/Streaming.hs new/cassava-0.5.4.0/src/Data/Csv/Streaming.hs --- old/cassava-0.5.3.2/src/Data/Csv/Streaming.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/cassava-0.5.4.0/src/Data/Csv/Streaming.hs 2001-09-09 03:46:40.000000000 +0200 @@ -21,11 +21,13 @@ , HasHeader(..) , decode , decodeWith + , decodeWithP -- ** Name-based record conversion -- $namebased , decodeByName , decodeByNameWith + , decodeByNameWithP ) where import Control.DeepSeq (NFData(rnf)) @@ -36,8 +38,9 @@ import Prelude hiding (foldr) import Data.Csv.Conversion +import qualified Data.Csv.Conversion as Conversion import Data.Csv.Incremental hiding (decode, decodeByName, decodeByNameWith, - decodeWith) + decodeByNameWithP, decodeWith, decodeWithP) import qualified Data.Csv.Incremental as I import Data.Csv.Parser import Data.Csv.Types @@ -134,8 +137,19 @@ -- skipped -> BL.ByteString -- ^ CSV data -> Records a -decodeWith !opts hasHeader s0 = - go (BL.toChunks s0) (I.decodeWith opts hasHeader) +decodeWith = decodeWithP parseRecord + +-- | Like 'decodeWith', but lets you specify a parser function. +-- +-- @since 0.5.4.0 +decodeWithP :: (Record -> Conversion.Parser a) + -> DecodeOptions -- ^ Decoding options + -> HasHeader -- ^ Data contains header that should be + -- skipped + -> BL.ByteString -- ^ CSV data + -> Records a +decodeWithP _parseRecord !opts hasHeader s0 = + go (BL.toChunks s0) (I.decodeWithP _parseRecord opts hasHeader) where go ss (Done xs) = foldr Cons (Nil Nothing (BL.fromChunks ss)) xs go ss (Fail rest err) = Nil (Just err) (BL.fromChunks (rest:ss)) @@ -159,7 +173,18 @@ => DecodeOptions -- ^ Decoding options -> BL.ByteString -- ^ CSV data -> Either String (Header, Records a) -decodeByNameWith !opts s0 = go (BL.toChunks s0) (I.decodeByNameWith opts) +decodeByNameWith = decodeByNameWithP parseNamedRecord + +-- | Like 'decodeByNameWith', but lets you specify a parser function. +-- +-- @since 0.5.4.0 +decodeByNameWithP :: (NamedRecord -> Conversion.Parser a) + -- ^ Custom parser function + -> DecodeOptions -- ^ Decoding options + -> BL.ByteString -- ^ CSV data + -> Either String (Header, Records a) +decodeByNameWithP _parseNamedRecord !opts s0 = + go (BL.toChunks s0) (I.decodeByNameWithP _parseNamedRecord opts) where go ss (DoneH hdr p) = Right (hdr, go2 ss p) go ss (FailH rest err) = Left $ err ++ " at " ++