Hello community,

here is the log from the commit of package ghc-Diff for openSUSE:Leap:15.2 
checked in at 2020-02-19 18:37:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/ghc-Diff (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.ghc-Diff.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-Diff"

Wed Feb 19 18:37:06 2020 rev:11 rq:771191 version:0.4.0

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/ghc-Diff/ghc-Diff.changes      2020-01-15 
15:00:34.377752129 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.ghc-Diff.new.26092/ghc-Diff.changes   
2020-02-19 18:37:08.649784003 +0100
@@ -1,0 +2,11 @@
+Fri Nov  8 16:13:35 UTC 2019 - Peter Simons <[email protected]>
+
+- Drop obsolete group attributes.
+
+-------------------------------------------------------------------
+Mon Sep 23 02:01:16 UTC 2019 - [email protected]
+
+- Update Diff to version 0.4.0.
+  Upstream does not provide a change log file.
+
+-------------------------------------------------------------------

Old:
----
  Diff-0.3.4.tar.gz

New:
----
  Diff-0.4.0.tar.gz

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

Other differences:
------------------
++++++ ghc-Diff.spec ++++++
--- /var/tmp/diff_new_pack.OYReEa/_old  2020-02-19 18:37:09.005784747 +0100
+++ /var/tmp/diff_new_pack.OYReEa/_new  2020-02-19 18:37:09.009784756 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-Diff
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,11 +19,10 @@
 %global pkg_name Diff
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.3.4
+Version:        0.4.0
 Release:        0
 Summary:        O(ND) diff algorithm in haskell
 License:        BSD-3-Clause
-Group:          Development/Libraries/Haskell
 URL:            https://hackage.haskell.org/package/%{pkg_name}
 Source0:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
 BuildRequires:  ghc-Cabal-devel
@@ -44,7 +43,6 @@
 
 %package devel
 Summary:        Haskell %{pkg_name} library development files
-Group:          Development/Libraries/Haskell
 Requires:       %{name} = %{version}-%{release}
 Requires:       ghc-compiler = %{ghc_version}
 Requires(post): ghc-compiler = %{ghc_version}

++++++ Diff-0.3.4.tar.gz -> Diff-0.4.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Diff-0.3.4/Diff.cabal new/Diff-0.4.0/Diff.cabal
--- old/Diff-0.3.4/Diff.cabal   2016-04-23 07:21:46.000000000 +0200
+++ new/Diff-0.4.0/Diff.cabal   2019-09-22 05:39:13.000000000 +0200
@@ -1,5 +1,5 @@
 name:                Diff
-version:             0.3.4
+version:             0.4.0
 synopsis:            O(ND) diff algorithm in haskell.
 description:         Implementation of the standard diff algorithm, and 
utilities for pretty printing.
 category:            Algorithms
@@ -32,3 +32,7 @@
                 , pretty, QuickCheck, test-framework
                 , test-framework-quickcheck2, process
                 , directory
+  other-modules:
+                   Data.Algorithm.Diff,
+                   Data.Algorithm.DiffOutput
+                   Data.Algorithm.DiffContext
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Diff-0.3.4/Setup.hs new/Diff-0.4.0/Setup.hs
--- old/Diff-0.3.4/Setup.hs     1970-01-01 01:00:00.000000000 +0100
+++ new/Diff-0.4.0/Setup.hs     2019-09-22 05:39:13.000000000 +0200
@@ -0,0 +1,3 @@
+#!/usr/bin/env runhaskell
+import Distribution.Simple
+main = defaultMain
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Diff-0.3.4/Setup.lhs new/Diff-0.4.0/Setup.lhs
--- old/Diff-0.3.4/Setup.lhs    2016-04-23 07:21:46.000000000 +0200
+++ new/Diff-0.4.0/Setup.lhs    1970-01-01 01:00:00.000000000 +0100
@@ -1,3 +0,0 @@
-#!/usr/bin/env runhaskell
-> import Distribution.Simple
-> main = defaultMain
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Diff-0.3.4/src/Data/Algorithm/Diff.hs 
new/Diff-0.4.0/src/Data/Algorithm/Diff.hs
--- old/Diff-0.3.4/src/Data/Algorithm/Diff.hs   2016-04-23 07:21:45.000000000 
+0200
+++ new/Diff-0.4.0/src/Data/Algorithm/Diff.hs   2019-09-22 05:39:13.000000000 
+0200
@@ -14,7 +14,7 @@
 -----------------------------------------------------------------------------
 
 module Data.Algorithm.Diff
-    ( Diff(..)
+    ( Diff, PolyDiff(..)
     -- * Comparing lists for differences
     , getDiff
     , getDiffBy
@@ -26,7 +26,7 @@
 
 import Prelude hiding (pi)
 
-import Data.Array
+import Data.Array (listArray, (!))
 
 data DI = F | S | B deriving (Show, Eq)
 
@@ -34,7 +34,11 @@
 -- 'Both' contains both the left and right values, in case you are using a form
 -- of equality that doesn't check all data (for example, if you are using a
 -- newtype to only perform equality on side of a tuple).
-data Diff a = First a | Second a | Both a a deriving (Show, Eq)
+data PolyDiff a b = First a | Second b | Both a b
+    deriving (Show, Eq)
+
+-- | This is 'PolyDiff' specialized so both sides are the same type.
+type Diff a = PolyDiff a a
 
 data DL = DL {poi :: !Int, poj :: !Int, path::[DI]} deriving (Show, Eq)
 
@@ -43,7 +47,7 @@
                 then  poj x > poj y
                 else poi x <= poi y
 
-canDiag :: (a -> a -> Bool) -> [a] -> [a] -> Int -> Int -> Int -> Int -> Bool
+canDiag :: (a -> b -> Bool) -> [a] -> [b] -> Int -> Int -> Int -> Int -> Bool
 canDiag eq as bs lena lenb = \ i j ->
    if i < lena && j < lenb then (arAs ! i) `eq` (arBs ! j) else False
     where arAs = listArray (0,lena - 1) as
@@ -68,7 +72,7 @@
     | otherwise   = dl
     where pi = poi dl; pj = poj dl
 
-lcs :: (a -> a -> Bool) -> [a] -> [a] -> [DI]
+lcs :: (a -> b -> Bool) -> [a] -> [b] -> [DI]
 lcs eq as bs = path . head . dropWhile (\dl -> poi dl /= lena || poj dl /= 
lenb) .
             concat . iterate (dstep cd) . (:[]) . addsnake cd $
             DL {poi=0,poj=0,path=[]}
@@ -77,24 +81,24 @@
 
 -- | Takes two lists and returns a list of differences between them. This is
 -- 'getDiffBy' with '==' used as predicate.
-getDiff :: (Eq t) => [t] -> [t] -> [Diff t]
+getDiff :: (Eq a) => [a] -> [a] -> [Diff a]
 getDiff = getDiffBy (==)
 
 -- | Takes two lists and returns a list of differences between them, grouped
 -- into chunks. This is 'getGroupedDiffBy' with '==' used as predicate.
-getGroupedDiff :: (Eq t) => [t] -> [t] -> [Diff [t]]
+getGroupedDiff :: (Eq a) => [a] -> [a] -> [Diff [a]]
 getGroupedDiff = getGroupedDiffBy (==)
 
 -- | A form of 'getDiff' with no 'Eq' constraint. Instead, an equality 
predicate
 -- is taken as the first argument.
-getDiffBy :: (t -> t -> Bool) -> [t] -> [t] -> [Diff t]
+getDiffBy :: (a -> b -> Bool) -> [a] -> [b] -> [PolyDiff a b]
 getDiffBy eq a b = markup a b . reverse $ lcs eq a b
     where markup (x:xs)   ys   (F:ds) = First x  : markup xs ys ds
           markup   xs   (y:ys) (S:ds) = Second y : markup xs ys ds
           markup (x:xs) (y:ys) (B:ds) = Both x y : markup xs ys ds
           markup _ _ _ = []
 
-getGroupedDiffBy :: (t -> t -> Bool) -> [t] -> [t] -> [Diff [t]]
+getGroupedDiffBy :: (a -> b -> Bool) -> [a] -> [b] -> [PolyDiff [a] [b]]
 getGroupedDiffBy eq a b = go $ getDiffBy eq a b
     where go (First x  : xs) = let (fs, rest) = goFirsts  xs in First  (x:fs)  
   : go rest
           go (Second x : xs) = let (fs, rest) = goSeconds xs in Second (x:fs)  
   : go rest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Diff-0.3.4/src/Data/Algorithm/DiffContext.hs 
new/Diff-0.4.0/src/Data/Algorithm/DiffContext.hs
--- old/Diff-0.3.4/src/Data/Algorithm/DiffContext.hs    2016-04-23 
07:21:45.000000000 +0200
+++ new/Diff-0.4.0/src/Data/Algorithm/DiffContext.hs    2019-09-22 
05:39:13.000000000 +0200
@@ -15,7 +15,7 @@
     , prettyContextDiff
     ) where
 
-import Data.Algorithm.Diff (Diff(..), getGroupedDiff)
+import Data.Algorithm.Diff (PolyDiff(..), Diff, getGroupedDiff)
 import Data.List (groupBy)
 import Data.Monoid (mappend)
 import Text.PrettyPrint (Doc, text, empty, hcat)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Diff-0.3.4/test/Test.hs new/Diff-0.4.0/test/Test.hs
--- old/Diff-0.3.4/test/Test.hs 2016-04-23 07:21:45.000000000 +0200
+++ new/Diff-0.4.0/test/Test.hs 2019-09-22 05:39:13.000000000 +0200
@@ -134,7 +134,7 @@
 prop_ppDiffR (DiffInput le ri) =
     let haskDiff=ppDiff $ getGroupedDiff le ri
         utilDiff= unsafePerformIO (runDiff (unlines le) (unlines ri))
-    in  cover (haskDiff == utilDiff) 90 "exact match" $
+    in  cover 90 (haskDiff == utilDiff) "exact match" $
                 classify (haskDiff == utilDiff) "exact match"
                         (div ((length haskDiff)*100) (length utilDiff) < 110) 
-- less than 10% bigger
     where


Reply via email to