Hello community,

here is the log from the commit of package ghc-psqueues for openSUSE:Factory 
checked in at 2016-02-11 12:37:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-psqueues (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-psqueues.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-psqueues"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-psqueues/ghc-psqueues.changes        
2015-11-10 10:02:43.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-psqueues.new/ghc-psqueues.changes   
2016-02-11 12:37:32.000000000 +0100
@@ -1,0 +2,6 @@
+Mon Feb  8 09:18:40 UTC 2016 - [email protected]
+
+- update to 0.2.2.0
+* Add Traversable instances
+
+-------------------------------------------------------------------

Old:
----
  psqueues-0.2.0.3.tar.gz

New:
----
  psqueues-0.2.2.0.tar.gz

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

Other differences:
------------------
++++++ ghc-psqueues.spec ++++++
--- /var/tmp/diff_new_pack.tGkxhq/_old  2016-02-11 12:37:33.000000000 +0100
+++ /var/tmp/diff_new_pack.tGkxhq/_new  2016-02-11 12:37:33.000000000 +0100
@@ -20,7 +20,7 @@
 %bcond_with tests
 
 Name:           ghc-psqueues
-Version:        0.2.0.3
+Version:        0.2.2.0
 Release:        0
 Summary:        Pure priority search queues
 Group:          System/Libraries

++++++ psqueues-0.2.0.3.tar.gz -> psqueues-0.2.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psqueues-0.2.0.3/CHANGELOG 
new/psqueues-0.2.2.0/CHANGELOG
--- old/psqueues-0.2.0.3/CHANGELOG      2015-09-23 19:48:13.000000000 +0200
+++ new/psqueues-0.2.2.0/CHANGELOG      2016-02-06 11:43:26.000000000 +0100
@@ -1,3 +1,9 @@
+- 0.2.2.0
+    * Fix import of Traversable on GHC 7.8
+
+- 0.2.1.0
+    * Add Traversable instances
+
 - 0.2.0.3
     * Bump HUnit dependency bounds
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psqueues-0.2.0.3/psqueues.cabal 
new/psqueues-0.2.2.0/psqueues.cabal
--- old/psqueues-0.2.0.3/psqueues.cabal 2015-09-23 19:48:13.000000000 +0200
+++ new/psqueues-0.2.2.0/psqueues.cabal 2016-02-06 11:43:26.000000000 +0100
@@ -1,5 +1,5 @@
 Name:          psqueues
-Version:       0.2.0.3
+Version:       0.2.2.0
 License:       BSD3
 License-file:  LICENSE
 Maintainer:    Jasper Van der Jeugt <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psqueues-0.2.0.3/src/Data/HashPSQ/Internal.hs 
new/psqueues-0.2.2.0/src/Data/HashPSQ/Internal.hs
--- old/psqueues-0.2.0.3/src/Data/HashPSQ/Internal.hs   2015-09-23 
19:48:13.000000000 +0200
+++ new/psqueues-0.2.2.0/src/Data/HashPSQ/Internal.hs   2016-02-06 
11:43:26.000000000 +0100
@@ -1,4 +1,7 @@
 {-# LANGUAGE BangPatterns               #-}
+{-# LANGUAGE DeriveFoldable             #-}
+{-# LANGUAGE DeriveFunctor              #-}
+{-# LANGUAGE DeriveTraversable          #-}
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
 {-# LANGUAGE ScopedTypeVariables        #-}
 module Data.HashPSQ.Internal
@@ -50,12 +53,13 @@
     , valid
     ) where
 
-import           Control.DeepSeq (NFData (..))
-import           Data.Foldable   (Foldable (foldr))
+import           Control.DeepSeq      (NFData (..))
+import           Data.Foldable        (Foldable (foldr))
 import           Data.Hashable
-import           Data.Maybe      (isJust)
-import           Prelude         hiding (foldr, lookup, map, null)
-import qualified Data.List       as List
+import qualified Data.List            as List
+import           Data.Maybe           (isJust)
+import           Prelude              hiding (foldr, lookup, map, null)
+import           Data.Traversable
 
 import qualified Data.IntPSQ.Internal as IntPSQ
 import qualified Data.OrdPSQ          as OrdPSQ
@@ -65,7 +69,7 @@
 ------------------------------------------------------------------------------
 
 data Bucket k p v = B !k !v !(OrdPSQ.OrdPSQ k p v)
-    deriving (Show)
+    deriving (Foldable, Functor, Show, Traversable)
 
 -- | Smart constructor which takes care of placing the minimum element directly
 -- in the 'Bucket'.
@@ -91,7 +95,7 @@
 -- | A priority search queue with keys of type @k@ and priorities of type @p@
 -- and values of type @v@. It is strict in keys, priorities and values.
 newtype HashPSQ k p v = HashPSQ (IntPSQ.IntPSQ p (Bucket k p v))
-    deriving (NFData, Show)
+    deriving (Foldable, Functor, NFData, Show, Traversable)
 
 instance (Eq k, Eq p, Eq v, Hashable k, Ord k, Ord p) =>
             Eq (HashPSQ k p v) where
@@ -102,15 +106,6 @@
         (Just _               , Nothing                ) -> False
         (Nothing              , Just _                 ) -> False
 
-instance Foldable (HashPSQ k p) where
-    foldr f z0 (HashPSQ ipsq) =
-        foldr f' z0 ipsq
-      where
-        f' (B _ x opsq) z = f x (foldr f z opsq)
-
-instance Functor (HashPSQ k p) where
-    fmap f = map (\_ _ v -> f v)
-
 
 ------------------------------------------------------------------------------
 -- Query
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psqueues-0.2.0.3/src/Data/IntPSQ/Internal.hs 
new/psqueues-0.2.2.0/src/Data/IntPSQ/Internal.hs
--- old/psqueues-0.2.0.3/src/Data/IntPSQ/Internal.hs    2015-09-23 
19:48:13.000000000 +0200
+++ new/psqueues-0.2.2.0/src/Data/IntPSQ/Internal.hs    2016-02-06 
11:43:26.000000000 +0100
@@ -1,6 +1,9 @@
-{-# LANGUAGE BangPatterns  #-}
-{-# LANGUAGE CPP           #-}
-{-# LANGUAGE UnboxedTuples #-}
+{-# LANGUAGE BangPatterns      #-}
+{-# LANGUAGE CPP               #-}
+{-# LANGUAGE DeriveFoldable    #-}
+{-# LANGUAGE DeriveFunctor     #-}
+{-# LANGUAGE DeriveTraversable #-}
+{-# LANGUAGE UnboxedTuples     #-}
 module Data.IntPSQ.Internal
     ( -- * Type
       Nat
@@ -58,19 +61,22 @@
     , validMask
     ) where
 
-import           Control.DeepSeq (NFData(rnf))
 import           Control.Applicative ((<$>), (<*>))
+import           Control.DeepSeq     (NFData (rnf))
 
-import           Data.BitUtil
 import           Data.Bits
-import           Data.List (foldl')
-import           Data.Maybe (isJust)
-import           Data.Word (Word)
-import           Data.Foldable (Foldable (foldr))
+import           Data.BitUtil
+import           Data.Foldable       (Foldable (foldr))
+import           Data.List           (foldl')
+import           Data.Maybe          (isJust)
+import           Data.Word           (Word)
+
+import qualified Data.List           as List
 
-import qualified Data.List as List
+import           Prelude             hiding (filter, foldl, foldr, lookup, map,
+                                      null)
 
-import           Prelude hiding (lookup, map, filter, foldr, foldl, null)
+import           Data.Traversable
 
 -- TODO (SM): get rid of bang patterns
 
@@ -101,7 +107,7 @@
     = Bin {-# UNPACK #-} !Key !p !v {-# UNPACK #-} !Mask !(IntPSQ p v) 
!(IntPSQ p v)
     | Tip {-# UNPACK #-} !Key !p !v
     | Nil
-    deriving (Show)
+    deriving (Foldable, Functor, Show, Traversable)
 
 instance (NFData p, NFData v) => NFData (IntPSQ p v) where
     rnf (Bin _k p v _m l r) = rnf p `seq` rnf v `seq` rnf l `seq` rnf r
@@ -116,17 +122,6 @@
         (Just _               , Nothing                ) -> False
         (Nothing              , Just _                 ) -> False
 
-instance Foldable (IntPSQ p) where
-    foldr _ z Nil               = z
-    foldr f z (Tip _ _ v)       = f v z
-    foldr f z (Bin _ _ v _ l r) = f v z''
-      where
-        z' = foldr f z l
-        z'' = foldr f z' r
-
-instance Functor (IntPSQ p) where
-       fmap f = map (\_ _ v -> f v)
-
 
 -- bit twiddling
 ----------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psqueues-0.2.0.3/src/Data/OrdPSQ/Internal.hs 
new/psqueues-0.2.2.0/src/Data/OrdPSQ/Internal.hs
--- old/psqueues-0.2.0.3/src/Data/OrdPSQ/Internal.hs    2015-09-23 
19:48:13.000000000 +0200
+++ new/psqueues-0.2.2.0/src/Data/OrdPSQ/Internal.hs    2016-02-06 
11:43:26.000000000 +0100
@@ -1,6 +1,9 @@
+{-# LANGUAGE BangPatterns        #-}
+{-# LANGUAGE DeriveFoldable      #-}
+{-# LANGUAGE DeriveFunctor       #-}
+{-# LANGUAGE DeriveTraversable   #-}
 {-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE Trustworthy         #-}
-{-# LANGUAGE BangPatterns        #-}
 module Data.OrdPSQ.Internal
     ( -- * Type
       OrdPSQ (..)
@@ -64,11 +67,12 @@
     , valid
     ) where
 
-import           Prelude         hiding (map, lookup, null, foldr)
-import           Control.DeepSeq (NFData(rnf))
-import           Data.Maybe      (isJust)
+import           Control.DeepSeq (NFData (rnf))
 import           Data.Foldable   (Foldable (foldr))
 import qualified Data.List       as List
+import           Data.Maybe      (isJust)
+import           Prelude         hiding (foldr, lookup, map, null)
+import           Data.Traversable
 
 
--------------------------------------------------------------------------------
 -- Types
@@ -76,7 +80,7 @@
 
 -- | @E k p v@ binds the key @k@ to the value @v@ with priority @p@.
 data Elem k p v = E !k !p !v
-    deriving (Show)
+    deriving (Foldable, Functor, Show, Traversable)
 
 instance (NFData k, NFData p, NFData v) => NFData (Elem k p v) where
     rnf (E k p v) = rnf k `seq` rnf p `seq` rnf v
@@ -88,7 +92,7 @@
     | Winner !(Elem k p v)
              !(LTree k p v)
              !k
-    deriving (Show)
+    deriving (Foldable, Functor, Show, Traversable)
 
 instance (NFData k, NFData p, NFData v) => NFData (OrdPSQ k p v) where
     rnf Void           = ()
@@ -102,13 +106,6 @@
         (Just _               , Nothing                ) -> False
         (Nothing              , Just _                 ) -> False
 
-instance Foldable (OrdPSQ k p) where
-    foldr _ z Void                   = z
-    foldr f z (Winner (E _ _ x) l _) = f x (foldr f z l)
-
-instance Functor (OrdPSQ k p) where
-    fmap f = map (\_ _ v -> f v)
-
 type Size = Int
 
 data LTree k p v
@@ -123,18 +120,13 @@
                             !(LTree k p v)
                             !k              -- split key
                             !(LTree k p v)
-    deriving (Show)
+    deriving (Foldable, Functor, Show, Traversable)
 
 instance (NFData k, NFData p, NFData v) => NFData (LTree k p v) where
     rnf Start              = ()
     rnf (LLoser _ e l k r) = rnf e `seq` rnf l `seq` rnf k `seq` rnf r
     rnf (RLoser _ e l k r) = rnf e `seq` rnf l `seq` rnf k `seq` rnf r
 
-instance Foldable (LTree k p) where
-    foldr _ z Start                      = z
-    foldr f z (LLoser _ (E _ _ x) l _ r) = f x (foldr f (foldr f z r) l)
-    foldr f z (RLoser _ (E _ _ x) l _ r) = f x (foldr f (foldr f z r) l)
-
 
 
--------------------------------------------------------------------------------
 -- Query


Reply via email to