Hello community,

here is the log from the commit of package ghc-extra for openSUSE:Factory 
checked in at 2015-09-24 06:15:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-extra (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-extra.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-extra"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-extra/ghc-extra.changes      2015-08-23 
17:38:54.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-extra.new/ghc-extra.changes 2015-09-24 
06:15:08.000000000 +0200
@@ -1,0 +2,6 @@
+Sun Sep 20 19:14:27 UTC 2015 - [email protected]
+
+- update to 1.4.2
+ * Make concatMapM/mapMaybeM faster
+
+-------------------------------------------------------------------

Old:
----
  extra-1.4.1.tar.gz

New:
----
  extra-1.4.2.tar.gz

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

Other differences:
------------------
++++++ ghc-extra.spec ++++++
--- /var/tmp/diff_new_pack.RYcmII/_old  2015-09-24 06:15:09.000000000 +0200
+++ /var/tmp/diff_new_pack.RYcmII/_new  2015-09-24 06:15:09.000000000 +0200
@@ -21,7 +21,7 @@
 %global debug_package %{nil}
 %bcond_with tests
 Name:           ghc-extra
-Version:        1.4.1
+Version:        1.4.2
 Release:        0
 Summary:        Extra functions I use
 License:        BSD-3-Clause

++++++ extra-1.4.1.tar.gz -> extra-1.4.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/extra-1.4.1/CHANGES.txt new/extra-1.4.2/CHANGES.txt
--- old/extra-1.4.1/CHANGES.txt 2015-08-04 22:37:36.000000000 +0200
+++ new/extra-1.4.2/CHANGES.txt 2015-09-14 22:42:07.000000000 +0200
@@ -1,5 +1,7 @@
 Changelog for Extra
 
+1.4.2
+    Make concatMapM/mapMaybeM faster
 1.4.1
     Make temp file functions workaround GHC bug #10731
     Add retryBool
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/extra-1.4.1/extra.cabal new/extra-1.4.2/extra.cabal
--- old/extra-1.4.1/extra.cabal 2015-08-04 22:37:36.000000000 +0200
+++ new/extra-1.4.2/extra.cabal 2015-09-14 22:42:07.000000000 +0200
@@ -1,7 +1,7 @@
 cabal-version:      >= 1.10
 build-type:         Simple
 name:               extra
-version:            1.4.1
+version:            1.4.2
 license:            BSD3
 license-file:       LICENSE
 category:           Development
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/extra-1.4.1/src/Control/Monad/Extra.hs 
new/extra-1.4.2/src/Control/Monad/Extra.hs
--- old/extra-1.4.1/src/Control/Monad/Extra.hs  2015-08-04 22:37:36.000000000 
+0200
+++ new/extra-1.4.2/src/Control/Monad/Extra.hs  2015-09-14 22:42:07.000000000 
+0200
@@ -1,4 +1,4 @@
-{-# LANGUAGE CPP #-}
+{-# LANGUAGE UnboxedTuples #-}
 
 -- | Extra functions for "Control.Monad".
 --   These functions provide looping, list operations and booleans.
@@ -13,14 +13,13 @@
     -- * Lists
     partitionM, concatMapM, mapMaybeM, findM, firstJustM,
     -- * Booleans
-    whenM, unlessM, ifM, notM, (||^), (&&^), orM, andM, anyM, allM,
+    whenM, unlessM, ifM, notM, (||^), (&&^), orM, andM, anyM, allM
     ) where
 
 import Control.Monad
-#if __GLASGOW_HASKELL__ < 709
 import Control.Applicative
-#endif
 import Data.Maybe
+import Prelude
 
 -- General utilities
 
@@ -58,11 +57,15 @@
 
 -- | A version of 'concatMap' that works with a monadic predicate.
 concatMapM :: Monad m => (a -> m [b]) -> [a] -> m [b]
-concatMapM f = liftM concat . mapM f
+{-# INLINE concatMapM #-}
+concatMapM op = foldr f (return [])
+    where f x xs = do x <- op x; if null x then xs else do xs <- xs; return $ 
x++xs
 
 -- | A version of 'mapMaybe' that works with a monadic predicate.
 mapMaybeM :: Monad m => (a -> m (Maybe b)) -> [a] -> m [b]
-mapMaybeM f = liftM catMaybes . mapM f
+{-# INLINE mapMaybeM #-}
+mapMaybeM op = foldr f (return [])
+    where f x xs = do x <- op x; case x of Nothing -> xs; Just x -> do xs <- 
xs; return $ x:xs
 
 -- Looping
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/extra-1.4.1/src/System/IO/Extra.hs 
new/extra-1.4.2/src/System/IO/Extra.hs
--- old/extra-1.4.1/src/System/IO/Extra.hs      2015-08-04 22:37:36.000000000 
+0200
+++ new/extra-1.4.2/src/System/IO/Extra.hs      2015-09-14 22:42:07.000000000 
+0200
@@ -127,7 +127,7 @@
                 hSetBuffering out buf
 
 
--- | Execute an action with a custom 'BufferMode', a warpper around
+-- | Execute an action with a custom 'BufferMode', a wrapper around
 --   'hSetBuffering'.
 withBuffering :: Handle -> BufferMode -> IO a -> IO a
 withBuffering h m act = bracket (hGetBuffering h) (hSetBuffering h) $ const $ 
do
@@ -141,7 +141,7 @@
 {-# NOINLINE tempRef #-}
 tempRef :: IORef Int
 tempRef = unsafePerformIO $ do
-    rand :: Integer <- fmap (read . take 50 . filter isDigit . show . 
utctDayTime) getCurrentTime
+    rand :: Integer <- fmap (read . reverse . filter isDigit . show . 
utctDayTime) getCurrentTime
     newIORef $ fromIntegral rand
 
 tempUnique :: IO Int


Reply via email to