Hello community,

here is the log from the commit of package ghc-extra for openSUSE:Factory 
checked in at 2020-08-28 21:32:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-extra (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-extra.new.3399 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-extra"

Fri Aug 28 21:32:23 2020 rev:28 rq:829270 version:1.7.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-extra/ghc-extra.changes      2020-07-21 
15:53:08.120496483 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-extra.new.3399/ghc-extra.changes    
2020-08-28 21:32:25.968640082 +0200
@@ -1,0 +2,20 @@
+Sat Aug 22 02:01:49 UTC 2020 - psim...@suse.com
+
+- Update extra to version 1.7.6.
+  1.7.6, released 2020-08-21
+      #66, add lots of functions to Data.Foldable.Extra (anyM etc)
+
+-------------------------------------------------------------------
+Tue Aug 18 10:44:48 UTC 2020 - Peter Simons <psim...@suse.com>
+
+- Replace %setup -q with the more modern %autosetup macro.
+
+-------------------------------------------------------------------
+Thu Aug 13 02:00:26 UTC 2020 - psim...@suse.com
+
+- Update extra to version 1.7.5.
+  1.7.5, released 2020-08-12
+      #65, add Data.Foldable.Extra
+      #65, add sum', product', sumOn' and productOn'
+
+-------------------------------------------------------------------

Old:
----
  extra-1.7.4.tar.gz

New:
----
  extra-1.7.6.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-extra.spec ++++++
--- /var/tmp/diff_new_pack.MEHDve/_old  2020-08-28 21:32:26.548640357 +0200
+++ /var/tmp/diff_new_pack.MEHDve/_new  2020-08-28 21:32:26.552640359 +0200
@@ -19,7 +19,7 @@
 %global pkg_name extra
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        1.7.4
+Version:        1.7.6
 Release:        0
 Summary:        Extra functions I use
 License:        BSD-3-Clause
@@ -60,7 +60,7 @@
 This package provides the Haskell %{pkg_name} library development files.
 
 %prep
-%setup -q -n %{pkg_name}-%{version}
+%autosetup -n %{pkg_name}-%{version}
 
 %build
 %ghc_lib_build

++++++ extra-1.7.4.tar.gz -> extra-1.7.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/extra-1.7.4/CHANGES.txt new/extra-1.7.6/CHANGES.txt
--- old/extra-1.7.4/CHANGES.txt 2020-07-15 22:39:09.000000000 +0200
+++ new/extra-1.7.6/CHANGES.txt 2020-08-21 22:30:19.000000000 +0200
@@ -1,5 +1,10 @@
 Changelog for Extra
 
+1.7.6, released 2020-08-21
+    #66, add lots of functions to Data.Foldable.Extra (anyM etc)
+1.7.5, released 2020-08-12
+    #65, add Data.Foldable.Extra
+    #65, add sum', product', sumOn' and productOn'
 1.7.4, released 2020-07-15
     #59, add whileJustM and untilJustM
     #61, optimise nubOrd (10% or so)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/extra-1.7.4/README.md new/extra-1.7.6/README.md
--- old/extra-1.7.4/README.md   2019-04-22 20:25:59.000000000 +0200
+++ new/extra-1.7.6/README.md   2020-08-03 22:29:28.000000000 +0200
@@ -21,3 +21,7 @@
 ## Base versions
 
 A mapping between `base` versions and GHC compiler versions can be found 
[here](https://wiki.haskell.org/Base_package#Versions).
+
+## Contributing
+
+My general contribution preferences are [available 
here](https://github.com/ndmitchell/neil#contributions). In addition, this repo 
contains some generated code which is checked in, namely 
[src/Extra.hs](src/Extra.hs) and [test/TestGen.hs](test/TestGen.hs). You can 
generate those files by either running `runhaskell Generate.hs` or `ghci` 
(which uses the [`.ghci` file](.ghci)) and typing `:generate`. All PR's should 
contain regenerated versions of those files.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/extra-1.7.4/extra.cabal new/extra-1.7.6/extra.cabal
--- old/extra-1.7.4/extra.cabal 2020-07-15 22:38:49.000000000 +0200
+++ new/extra-1.7.6/extra.cabal 2020-08-21 22:30:24.000000000 +0200
@@ -1,7 +1,7 @@
 cabal-version:      >= 1.18
 build-type:         Simple
 name:               extra
-version:            1.7.4
+version:            1.7.6
 license:            BSD3
 license-file:       LICENSE
 category:           Development
@@ -15,7 +15,7 @@
     The module "Extra" documents all functions provided by this library. 
Modules such as "Data.List.Extra" provide extra functions over "Data.List" and 
also reexport "Data.List". Users are recommended to replace "Data.List" imports 
with "Data.List.Extra" if they need the extra functionality.
 homepage:           https://github.com/ndmitchell/extra#readme
 bug-reports:        https://github.com/ndmitchell/extra/issues
-tested-with:        GHC==8.10.1, GHC==8.8.3, GHC==8.6.5, GHC==8.4.4, 
GHC==8.2.2, GHC==8.0.2
+tested-with:        GHC==8.10, GHC==8.8, GHC==8.6, GHC==8.4, GHC==8.2, GHC==8.0
 
 extra-doc-files:
     CHANGES.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/extra-1.7.4/src/Data/List/Extra.hs 
new/extra-1.7.6/src/Data/List/Extra.hs
--- old/extra-1.7.4/src/Data/List/Extra.hs      2020-07-15 22:38:55.000000000 
+0200
+++ new/extra-1.7.6/src/Data/List/Extra.hs      2020-08-12 10:12:25.000000000 
+0200
@@ -28,6 +28,8 @@
     nubOn, groupOn,
     nubSort, nubSortBy, nubSortOn,
     maximumOn, minimumOn,
+    sum', product',
+    sumOn', productOn',
     disjoint, disjointOrd, disjointOrdBy, allSame, anySame,
     repeatedly, firstJust,
     concatUnzip, concatUnzip3,
@@ -455,6 +457,32 @@
 groupSortBy f = groupBy (\a b -> f a b == EQ) . sortBy f
 
 
+-- | A strict version of 'sum'.
+--   Unlike 'sum' this function is always strict in the `Num` argument,
+--   whereas the standard version is only strict if the optimiser kicks in.
+--
+-- > sum' [1, 2, 3] == 6
+sum' :: (Num a) => [a] -> a
+sum' = foldl' (+) 0
+
+-- | A strict version of 'sum', using a custom valuation function.
+--
+-- > sumOn' read ["1", "2", "3"] == 6
+sumOn' :: (Num b) => (a -> b) -> [a] -> b
+sumOn' f = foldl' (\acc x -> acc + f x) 0
+
+-- | A strict version of 'product'.
+--
+-- > product' [1, 2, 4] == 8
+product' :: (Num a) => [a] -> a
+product' = foldl' (*) 1
+
+-- | A strict version of 'product', using a custom valuation function.
+--
+-- > productOn' read ["1", "2", "4"] == 8
+productOn' :: (Num b) => (a -> b) -> [a] -> b
+productOn' f = foldl' (\acc x -> acc * f x) 1
+
 -- | Merge two lists which are assumed to be ordered.
 --
 -- > merge "ace" "bd" == "abcde"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/extra-1.7.4/src/Extra.hs new/extra-1.7.6/src/Extra.hs
--- old/extra-1.7.4/src/Extra.hs        2020-07-15 22:38:55.000000000 +0200
+++ new/extra-1.7.6/src/Extra.hs        2020-08-12 10:15:49.000000000 +0200
@@ -23,7 +23,7 @@
     writeIORef', atomicWriteIORef', atomicModifyIORef_, atomicModifyIORef'_,
     -- * Data.List.Extra
     -- | Extra functions available in @"Data.List.Extra"@.
-    lower, upper, trim, trimStart, trimEnd, word1, line1, escapeHTML, 
escapeJSON, unescapeHTML, unescapeJSON, dropEnd, takeEnd, splitAtEnd, breakEnd, 
spanEnd, dropWhileEnd', takeWhileEnd, stripSuffix, stripInfix, stripInfixEnd, 
dropPrefix, dropSuffix, wordsBy, linesBy, breakOn, breakOnEnd, splitOn, split, 
chunksOf, headDef, lastDef, notNull, list, unsnoc, cons, snoc, drop1, dropEnd1, 
mconcatMap, enumerate, groupSort, groupSortOn, groupSortBy, nubOrd, nubOrdBy, 
nubOrdOn, nubOn, groupOn, nubSort, nubSortBy, nubSortOn, maximumOn, minimumOn, 
disjoint, disjointOrd, disjointOrdBy, allSame, anySame, repeatedly, firstJust, 
concatUnzip, concatUnzip3, zipFrom, zipWithFrom, zipWithLongest, replace, 
merge, mergeBy,
+    lower, upper, trim, trimStart, trimEnd, word1, line1, escapeHTML, 
escapeJSON, unescapeHTML, unescapeJSON, dropEnd, takeEnd, splitAtEnd, breakEnd, 
spanEnd, dropWhileEnd', takeWhileEnd, stripSuffix, stripInfix, stripInfixEnd, 
dropPrefix, dropSuffix, wordsBy, linesBy, breakOn, breakOnEnd, splitOn, split, 
chunksOf, headDef, lastDef, notNull, list, unsnoc, cons, snoc, drop1, dropEnd1, 
mconcatMap, enumerate, groupSort, groupSortOn, groupSortBy, nubOrd, nubOrdBy, 
nubOrdOn, nubOn, groupOn, nubSort, nubSortBy, nubSortOn, maximumOn, minimumOn, 
sum', product', sumOn', productOn', disjoint, disjointOrd, disjointOrdBy, 
allSame, anySame, repeatedly, firstJust, concatUnzip, concatUnzip3, zipFrom, 
zipWithFrom, zipWithLongest, replace, merge, mergeBy,
     -- * Data.List.NonEmpty.Extra
     -- | Extra functions available in @"Data.List.NonEmpty.Extra"@.
     (|:), (|>), appendl, appendr, maximum1, minimum1, maximumBy1, minimumBy1, 
maximumOn1, minimumOn1,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/extra-1.7.4/test/TestGen.hs 
new/extra-1.7.6/test/TestGen.hs
--- old/extra-1.7.4/test/TestGen.hs     2020-06-06 17:55:33.000000000 +0200
+++ new/extra-1.7.6/test/TestGen.hs     2020-08-12 10:11:43.000000000 +0200
@@ -172,6 +172,10 @@
     testGen "\\xs -> concatMap snd (groupSort xs) == map snd (sortOn fst xs)" 
$ \xs -> concatMap snd (groupSort xs) == map snd (sortOn fst xs)
     testGen "groupSortOn length [\"test\",\"of\",\"sized\",\"item\"] == 
[[\"of\"],[\"test\",\"item\"],[\"sized\"]]" $ groupSortOn length 
["test","of","sized","item"] == [["of"],["test","item"],["sized"]]
     testGen "groupSortBy (compare `on` length) 
[\"test\",\"of\",\"sized\",\"item\"] == 
[[\"of\"],[\"test\",\"item\"],[\"sized\"]]" $ groupSortBy (compare `on` length) 
["test","of","sized","item"] == [["of"],["test","item"],["sized"]]
+    testGen "sum' [1, 2, 3] == 6" $ sum' [1, 2, 3] == 6
+    testGen "sumOn' read [\"1\", \"2\", \"3\"] == 6" $ sumOn' read ["1", "2", 
"3"] == 6
+    testGen "product' [1, 2, 4] == 8" $ product' [1, 2, 4] == 8
+    testGen "productOn' read [\"1\", \"2\", \"4\"] == 8" $ productOn' read 
["1", "2", "4"] == 8
     testGen "merge \"ace\" \"bd\" == \"abcde\"" $ merge "ace" "bd" == "abcde"
     testGen "\\xs ys -> merge (sort xs) (sort ys) == sort (xs ++ ys)" $ \xs ys 
-> merge (sort xs) (sort ys) == sort (xs ++ ys)
     testGen "replace \"el\" \"_\" \"Hello Bella\" == \"H_lo B_la\"" $ replace 
"el" "_" "Hello Bella" == "H_lo B_la"


Reply via email to