Hello community,

here is the log from the commit of package ghc-foldl for openSUSE:Factory 
checked in at 2016-03-16 10:36:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-foldl (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-foldl.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-foldl"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-foldl/ghc-foldl.changes      2016-02-09 
13:32:00.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-foldl.new/ghc-foldl.changes 2016-03-16 
10:36:36.000000000 +0100
@@ -1,0 +2,5 @@
+Sun Mar 13 12:05:26 UTC 2016 - mimi...@gmail.com
+
+- update to 1.1.6 
+
+-------------------------------------------------------------------

Old:
----
  foldl-1.1.5.tar.gz

New:
----
  foldl-1.1.6.tar.gz

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

Other differences:
------------------
++++++ ghc-foldl.spec ++++++
--- /var/tmp/diff_new_pack.I2Fti2/_old  2016-03-16 10:36:37.000000000 +0100
+++ /var/tmp/diff_new_pack.I2Fti2/_new  2016-03-16 10:36:37.000000000 +0100
@@ -18,7 +18,7 @@
 %global pkg_name foldl
 
 Name:           ghc-foldl
-Version:        1.1.5
+Version:        1.1.6
 Release:        0
 Summary:        Composable, streaming, and efficient left folds
 Group:          System/Libraries

++++++ foldl-1.1.5.tar.gz -> foldl-1.1.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/foldl-1.1.5/foldl.cabal new/foldl-1.1.6/foldl.cabal
--- old/foldl-1.1.5/foldl.cabal 2016-01-22 07:01:46.000000000 +0100
+++ new/foldl-1.1.6/foldl.cabal 2016-03-12 21:01:49.000000000 +0100
@@ -1,5 +1,5 @@
 Name: foldl
-Version: 1.1.5
+Version: 1.1.6
 Cabal-Version: >=1.8.0.2
 Build-Type: Simple
 License: BSD3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/foldl-1.1.5/src/Control/Foldl.hs 
new/foldl-1.1.6/src/Control/Foldl.hs
--- old/foldl-1.1.5/src/Control/Foldl.hs        2016-01-22 07:01:46.000000000 
+0100
+++ new/foldl-1.1.6/src/Control/Foldl.hs        2016-03-12 21:01:49.000000000 
+0100
@@ -64,7 +64,9 @@
     , sum
     , product
     , maximum
+    , maximumBy
     , minimum
+    , minimumBy
     , elem
     , notElem
     , find
@@ -549,11 +551,33 @@
 maximum = _Fold1 max
 {-# INLINABLE maximum #-}
 
+{-| Computes the maximum element with respect to the given comparison
+    function
+-}
+maximumBy :: (a -> a -> Ordering) -> Fold a (Maybe a)
+maximumBy cmp = _Fold1 max'
+  where 
+    max' x y = case cmp x y of
+        GT -> x
+        _  -> y
+{-# INLINABLE maximumBy #-}
+
 -- | Computes the minimum element
 minimum :: Ord a => Fold a (Maybe a)
 minimum = _Fold1 min
 {-# INLINABLE minimum #-}
 
+{-| Computes the minimum element with respect to the given comparison
+    function
+-}
+minimumBy :: (a -> a -> Ordering) -> Fold a (Maybe a)
+minimumBy cmp = _Fold1 min'
+  where 
+    min' x y = case cmp x y of
+        GT -> y
+        _  -> x
+{-# INLINABLE minimumBy #-}
+
 {-| @(elem a)@ returns 'True' if the container has an element equal to @a@,
     'False' otherwise
 -}
@@ -927,6 +951,7 @@
 > handles _1       :: Fold a r -> Fold (a, b) r
 > handles _Left    :: Fold a r -> Fold (Either a b) r
 > handles traverse :: Traversable t => Fold a r -> Fold (t a) r
+> handles folded   :: Foldable    t => Fold a r -> Fold (t a) r
 
 >>> fold (handles traverse sum) [[1..5],[6..10]]
 55
@@ -934,7 +959,7 @@
 >>> fold (handles (traverse.traverse) sum) [[Nothing, Just 2, Just 7],[Just 
 >>> 13, Nothing, Just 20]]
 42
 
->>> fold (handles (filtered even) sum) [1,3,5,7,21,21]
+>>> fold (handles (filtered even) sum) [1..10]
 42
 
 >>> fold (handles _2 mconcat) [(1,"Hello "),(2,"World"),(3,"!")]
@@ -978,6 +1003,7 @@
 > handlesM _1       :: FoldM m a r -> FoldM (a, b) r
 > handlesM _Left    :: FoldM m a r -> FoldM (Either a b) r
 > handlesM traverse :: Traversable t => FoldM m a r -> FoldM m (t a) r
+> handlesM folded   :: Foldable    t => FoldM m a r -> FoldM m (t a) r
 
     `handlesM` obeys these laws:
 


Reply via email to