Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-foldl for openSUSE:Factory 
checked in at 2021-08-25 20:56:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-foldl (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-foldl.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-foldl"

Wed Aug 25 20:56:51 2021 rev:20 rq:912599 version:1.4.12

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-foldl/ghc-foldl.changes      2021-03-10 
08:56:47.442860210 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-foldl.new.1899/ghc-foldl.changes    
2021-08-25 20:57:40.921202640 +0200
@@ -1,0 +2,9 @@
+Sat Jul 10 13:40:23 UTC 2021 - [email protected]
+
+- Update foldl to version 1.4.12.
+  1.4.12
+
+  * `Data.Functor.Extend.Extended` instances for `Fold` / `FoldM`
+  * Remove dependency on `mwc-random`
+
+-------------------------------------------------------------------

Old:
----
  foldl-1.4.11.tar.gz

New:
----
  foldl-1.4.12.tar.gz

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

Other differences:
------------------
++++++ ghc-foldl.spec ++++++
--- /var/tmp/diff_new_pack.z3jgFW/_old  2021-08-25 20:57:42.253200891 +0200
+++ /var/tmp/diff_new_pack.z3jgFW/_new  2021-08-25 20:57:42.257200886 +0200
@@ -19,7 +19,7 @@
 %global pkg_name foldl
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        1.4.11
+Version:        1.4.12
 Release:        0
 Summary:        Composable, streaming, and efficient left folds
 License:        BSD-3-Clause
@@ -31,9 +31,9 @@
 BuildRequires:  ghc-containers-devel
 BuildRequires:  ghc-contravariant-devel
 BuildRequires:  ghc-hashable-devel
-BuildRequires:  ghc-mwc-random-devel
 BuildRequires:  ghc-primitive-devel
 BuildRequires:  ghc-profunctors-devel
+BuildRequires:  ghc-random-devel
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-semigroupoids-devel
 BuildRequires:  ghc-text-devel

++++++ foldl-1.4.11.tar.gz -> foldl-1.4.12.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/foldl-1.4.11/CHANGELOG.md 
new/foldl-1.4.12/CHANGELOG.md
--- old/foldl-1.4.11/CHANGELOG.md       2021-02-25 06:27:30.000000000 +0100
+++ new/foldl-1.4.12/CHANGELOG.md       2001-09-09 03:46:40.000000000 +0200
@@ -1,3 +1,8 @@
+1.4.12
+
+* `Data.Functor.Extend.Extended` instances for `Fold` / `FoldM`
+* Remove dependency on `mwc-random`
+
 1.4.11
 
 * Fix doctest failure when built against newer versions of the `hashable`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/foldl-1.4.11/foldl.cabal new/foldl-1.4.12/foldl.cabal
--- old/foldl-1.4.11/foldl.cabal        2021-02-25 06:27:30.000000000 +0100
+++ new/foldl-1.4.12/foldl.cabal        2001-09-09 03:46:40.000000000 +0200
@@ -1,5 +1,5 @@
 Name: foldl
-Version: 1.4.11
+Version: 1.4.12
 Cabal-Version: >=1.10
 Build-Type: Simple
 License: BSD3
@@ -26,7 +26,7 @@
     Build-Depends:
         base         >= 4.8      && < 5   ,
         bytestring   >= 0.9.2.1  && < 0.12,
-        mwc-random   >= 0.13.1.0 && < 0.16,
+        random       >= 1.2      && < 1.3 ,
         primitive                   < 0.8 ,
         text         >= 0.11.2.0 && < 1.3 ,
         transformers >= 0.2.0.0  && < 0.6 ,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/foldl-1.4.11/src/Control/Foldl.hs 
new/foldl-1.4.12/src/Control/Foldl.hs
--- old/foldl-1.4.11/src/Control/Foldl.hs       2021-02-25 06:27:30.000000000 
+0100
+++ new/foldl-1.4.12/src/Control/Foldl.hs       2001-09-09 03:46:40.000000000 
+0200
@@ -160,6 +160,7 @@
 import Data.Monoid hiding ((<>))
 import Data.Semigroup (Semigroup(..))
 import Data.Semigroupoid (Semigroupoid)
+import Data.Functor.Extend (Extend(..))
 import Data.Profunctor
 import Data.Sequence ((|>))
 import Data.Vector.Generic (Vector, Mutable)
@@ -167,7 +168,7 @@
 import Data.Hashable (Hashable)
 import Data.Traversable
 import Numeric.Natural (Natural)
-import System.Random.MWC (GenIO, createSystemRandom, uniformR)
+import System.Random (StdGen, newStdGen, uniformR)
 import Prelude hiding
     ( head
     , last
@@ -260,6 +261,10 @@
         in  Fold step begin done
     {-# INLINE (<*>) #-}
 
+instance Extend (Fold a) where
+    duplicated = duplicate
+    {-# INLINE duplicated #-}
+
 instance Semigroup b => Semigroup (Fold a b) where
     (<>) = liftA2 (<>)
     {-# INLINE (<>) #-}
@@ -396,6 +401,10 @@
         in  FoldM step begin done
     {-# INLINE (<*>) #-}
 
+instance Monad m => Extend (FoldM m a) where
+    duplicated = duplicateM
+    {-# INLINE duplicated #-}
+
 instance Functor m => Profunctor (FoldM m) where
     rmap = fmap
     lmap f (FoldM step begin done) = FoldM step' begin done
@@ -798,14 +807,14 @@
 random = FoldM step begin done
   where
     begin = do
-        g <- createSystemRandom
+        g <- newStdGen
         return $! Pair3 g Nothing' (1 :: Int)
 
     step (Pair3 g Nothing'  _) a = return $! Pair3 g (Just' a) 2
     step (Pair3 g (Just' a) m) b = do
-        n <- uniformR (1, m) g
+        let (n, g') = uniformR (1, m) g
         let c = if n == 1 then b else a
-        return $! Pair3 g (Just' c) (m + 1)
+        return $! Pair3 g' (Just' c) (m + 1)
 
     done (Pair3 _ ma _) = return (lazy ma)
 {-# INLINABLE random #-}
@@ -816,7 +825,7 @@
     { _size      ::                !VectorState
     , _reservoir ::                !(Mutable v RealWorld a)
     , _position  :: {-# UNPACK #-} !Int
-    , _gen       :: {-# UNPACK #-} !GenIO
+    , _gen       :: {-# UNPACK #-} !StdGen
     }
 
 -- | Pick several random elements, using reservoir sampling
@@ -832,15 +841,15 @@
         let s  = if n <= m' then Complete else Incomplete m'
         return $! RandomNState s mv (i + 1) g
     step (RandomNState  Complete      mv i g) a = do
-        r <- uniformR (0, i - 1) g
+        let (r, g') = uniformR (0, i - 1) g
         if r < n
             then M.unsafeWrite mv r a
             else return ()
-        return (RandomNState Complete mv (i + 1) g)
+        return (RandomNState Complete mv (i + 1) g')
 
     begin = do
         mv  <- M.new n
-        gen <- createSystemRandom
+        gen <- newStdGen
         let s = if n <= 0 then Complete else Incomplete 0
         return (RandomNState s mv 1 gen)
 

Reply via email to