Hello community, here is the log from the commit of package ghc-equivalence for openSUSE:Factory checked in at 2017-03-20 17:06:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-equivalence (Old) and /work/SRC/openSUSE:Factory/.ghc-equivalence.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-equivalence" Mon Mar 20 17:06:55 2017 rev:2 rq:477447 version:0.3.2 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-equivalence/ghc-equivalence.changes 2016-09-25 14:41:55.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-equivalence.new/ghc-equivalence.changes 2017-03-20 17:06:56.744041929 +0100 @@ -1,0 +2,10 @@ +Mon Feb 20 08:42:04 UTC 2017 - [email protected] + +- Update to version 0.3.2 revision 1 with cabal2obs. + +------------------------------------------------------------------- +Sun Feb 12 14:17:58 UTC 2017 - [email protected] + +- Update to version 0.3.2 with cabal2obs. + +------------------------------------------------------------------- Old: ---- equivalence-0.3.1.tar.gz New: ---- equivalence-0.3.2.tar.gz equivalence.cabal ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-equivalence.spec ++++++ --- /var/tmp/diff_new_pack.UHMeyk/_old 2017-03-20 17:06:57.547928420 +0100 +++ /var/tmp/diff_new_pack.UHMeyk/_new 2017-03-20 17:06:57.551927856 +0100 @@ -1,7 +1,7 @@ # # spec file for package ghc-equivalence # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 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,15 +19,15 @@ %global pkg_name equivalence %bcond_with tests Name: ghc-%{pkg_name} -Version: 0.3.1 +Version: 0.3.2 Release: 0 Summary: Maintaining an equivalence relation implemented as union-find using STT License: BSD-3-Clause -Group: System/Libraries +Group: Development/Languages/Other Url: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz +Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal#/%{pkg_name}.cabal BuildRequires: ghc-Cabal-devel -# Begin cabal-rpm deps: BuildRequires: ghc-STMonadTrans-devel BuildRequires: ghc-containers-devel BuildRequires: ghc-mtl-devel @@ -41,7 +41,6 @@ BuildRequires: ghc-test-framework-devel BuildRequires: ghc-test-framework-quickcheck2-devel %endif -# End cabal-rpm deps %description This is an implementation of Tarjan's Union-Find algorithm (Robert E. @@ -63,21 +62,16 @@ %prep %setup -q -n %{pkg_name}-%{version} - +cp -p %{SOURCE1} %{pkg_name}.cabal %build %ghc_lib_build - %install %ghc_lib_install - %check -%if %{with tests} -%{cabal} test -%endif - +%cabal_test %post devel %ghc_pkg_recache @@ -91,5 +85,6 @@ %files devel -f %{name}-devel.files %defattr(-,root,root,-) +%doc CHANGES.txt %changelog ++++++ equivalence-0.3.1.tar.gz -> equivalence-0.3.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/equivalence-0.3.1/CHANGES.txt new/equivalence-0.3.2/CHANGES.txt --- old/equivalence-0.3.1/CHANGES.txt 2015-04-10 08:48:03.000000000 +0200 +++ new/equivalence-0.3.2/CHANGES.txt 2017-02-07 13:09:08.000000000 +0100 @@ -1,3 +1,7 @@ +0.3.2 +----- +* add Applicative constraints for backwards compatibility with GHC 7.8 + 0.3.1 ----- * use transformers-compat for backwards compatibility with older versions of transformers diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/equivalence-0.3.1/equivalence.cabal new/equivalence-0.3.2/equivalence.cabal --- old/equivalence-0.3.1/equivalence.cabal 2015-04-10 08:48:03.000000000 +0200 +++ new/equivalence-0.3.2/equivalence.cabal 2017-02-07 13:09:08.000000000 +0100 @@ -1,11 +1,11 @@ Name: equivalence -Version: 0.3.1 +Version: 0.3.2 License: BSD3 License-File: LICENSE Author: Patrick Bahr Maintainer: [email protected] -Homepage: https://bitbucket.org/paba/equivalence/ -bug-reports: https://bitbucket.org/paba/equivalence/issues/new +Homepage: https://github.com/pa-ba/equivalence +bug-reports: https://github.com/pa-ba/equivalence/issues/new Synopsis: Maintaining an equivalence relation implemented as union-find using STT. Description: This is an implementation of Tarjan's Union-Find algorithm (Robert @@ -24,8 +24,8 @@ source-repository head - type: hg - location: https://bitbucket.org/paba/equivalence/ + type: git + location: https://github.com/pa-ba/equivalence Test-Suite test @@ -39,7 +39,7 @@ Library Build-Depends: - base >= 4 && < 5, containers, mtl >= 2.0.1, STMonadTrans, + base >= 4 && < 5, containers, mtl >= 2.0.1, STMonadTrans >= 0.4.1, transformers >= 0.2, transformers-compat >= 0.3 Exposed-Modules: Data.Equivalence.STT, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/equivalence-0.3.1/src/Data/Equivalence/Monad.hs new/equivalence-0.3.2/src/Data/Equivalence/Monad.hs --- old/equivalence-0.3.1/src/Data/Equivalence/Monad.hs 2015-04-10 08:48:03.000000000 +0200 +++ new/equivalence-0.3.2/src/Data/Equivalence/Monad.hs 2017-02-07 13:09:08.000000000 +0100 @@ -89,7 +89,7 @@ instance Functor m => Functor (EquivT s c v m) where fmap f (EquivT m) = EquivT $ fmap f m -instance (Functor m, Monad m) => Applicative (EquivT s c v m) where +instance (Applicative m, Monad m) => Applicative (EquivT s c v m) where pure = EquivT . pure (EquivT f) <*> (EquivT a) = EquivT (f <*> a) @@ -122,7 +122,7 @@ an equivalence class descriptor for a singleton class and how to combine two equivalence class descriptors. -} -runEquivT :: (Monad m) +runEquivT :: (Monad m, Applicative m) => (v -> c) -- ^ used to construct an equivalence class descriptor for a singleton class -> (c -> c -> c) -- ^ used to combine the equivalence class descriptor of two classes -- which are meant to be combined. @@ -136,7 +136,7 @@ {-| This function is a special case of 'runEquivT' that only maintains trivial equivalence class descriptors of type @()@. -} -runEquivT' :: (Monad m) => (forall s. EquivT' s v m a) -> m a +runEquivT' :: (Monad m, Applicative m) => (forall s. EquivT' s v m a) -> m a runEquivT' = runEquivT (const ()) (\_ _-> ()) {-| This function runs a monadic computation that maintains an @@ -159,7 +159,7 @@ {-| This class specifies the interface for a monadic computation that maintains an equivalence relation. -} -class (Monad m, Ord v) => MonadEquiv c v d m | m -> v, m -> c, m -> d where +class (Monad m, Applicative m, Ord v) => MonadEquiv c v d m | m -> v, m -> c, m -> d where {-| This function decides whether the two given elements are equivalent in the current equivalence relation -} @@ -228,7 +228,7 @@ -instance (Monad m, Ord v) => MonadEquiv (Class s d v) v d (EquivT s d v m) where +instance (Monad m, Applicative m, Ord v) => MonadEquiv (Class s d v) v d (EquivT s d v m) where equivalent x y = EquivT $ do part <- ask lift $ S.equivalent part x y diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/equivalence-0.3.1/src/Data/Equivalence/STT.hs new/equivalence-0.3.2/src/Data/Equivalence/STT.hs --- old/equivalence-0.3.1/src/Data/Equivalence/STT.hs 2015-04-10 08:48:03.000000000 +0200 +++ new/equivalence-0.3.2/src/Data/Equivalence/STT.hs 2017-02-07 13:09:08.000000000 +0100 @@ -61,6 +61,7 @@ import Control.Monad.ST.Trans import Control.Monad +import Control.Applicative import Data.Maybe @@ -116,7 +117,7 @@ @a@). The arguments are used to maintain equivalence class descriptors. -} -leastEquiv :: Monad m +leastEquiv :: (Monad m, Applicative m) => (a -> c) -- ^ used to construct an equivalence class descriptor for a singleton class -> (c -> c -> c) -- ^ used to combine the equivalence class descriptor of two classes -- which are meant to be combined. @@ -133,7 +134,7 @@ This function performs path compression. -} -representative' :: Monad m => Entry s c a -> STT s m (Maybe (Entry s c a),Bool) +representative' :: (Monad m, Applicative m) => Entry s c a -> STT s m (Maybe (Entry s c a),Bool) representative' (Entry e) = do ed <- readSTRef e case ed of @@ -151,7 +152,7 @@ This function performs path compression. -} -representative :: (Monad m, Ord a) => Equiv s c a -> a -> STT s m (Entry s c a) +representative :: (Monad m, Applicative m, Ord a) => Equiv s c a -> a -> STT s m (Entry s c a) representative eq v = do mentry <- getEntry eq v case mentry of -- check whether there is an entry @@ -167,7 +168,7 @@ {-| This function provides the representative entry of the given equivalence class. This function performs path compression. -} -classRep :: (Monad m, Ord a) => Equiv s c a -> Class s c a -> STT s m (Entry s c a) +classRep :: (Monad m, Applicative m, Ord a) => Equiv s c a -> Class s c a -> STT s m (Entry s c a) classRep eq (Class p) = do entry <- readSTRef p (mrepr,del) <- representative' entry @@ -187,7 +188,7 @@ entry's value, inserts it into the lookup table (thereby removing any existing entry). -} -mkEntry' :: (Monad m, Ord a) +mkEntry' :: (Monad m, Applicative m, Ord a) => Equiv s c a -> Entry s c a -> STT s m (Entry s c a) -- ^ the constructed entry mkEntry' eq (Entry e) = readSTRef e >>= mkEntry eq . entryValue @@ -196,7 +197,7 @@ value, inserts it into the lookup table (thereby removing any existing entry). -} -mkEntry :: (Monad m, Ord a) +mkEntry :: (Monad m, Applicative m, Ord a) => Equiv s c a -> a -> STT s m (Entry s c a) -- ^ the constructed entry mkEntry Equiv {entries = mref, singleDesc = mkDesc} val = do @@ -214,13 +215,13 @@ {-| This function provides the equivalence class the given element is contained in. -} -getClass :: (Monad m, Ord a) => Equiv s c a -> a -> STT s m (Class s c a) +getClass :: (Monad m, Applicative m, Ord a) => Equiv s c a -> a -> STT s m (Class s c a) getClass eq v = do en <- (getEntry' eq v) liftM Class $ newSTRef en -getEntry' :: (Monad m, Ord a) => Equiv s c a -> a -> STT s m (Entry s c a) +getEntry' :: (Monad m, Applicative m, Ord a) => Equiv s c a -> a -> STT s m (Entry s c a) getEntry' eq v = do mentry <- getEntry eq v case mentry of @@ -231,7 +232,7 @@ equivalence relation representation or @Nothing@ if there is none, yet. -} -getEntry :: (Monad m, Ord a) => Equiv s c a -> a -> STT s m (Maybe (Entry s c a)) +getEntry :: (Monad m, Applicative m, Ord a) => Equiv s c a -> a -> STT s m (Maybe (Entry s c a)) getEntry Equiv { entries = mref} val = do m <- readSTRef mref case Map.lookup val m of @@ -245,7 +246,7 @@ descriptor. The returned entry is the representative of the new equivalence class -} -equateEntry :: (Monad m, Ord a) => Equiv s c a -> Entry s c a -> Entry s c a -> STT s m (Entry s c a) +equateEntry :: (Monad m, Applicative m, Ord a) => Equiv s c a -> Entry s c a -> Entry s c a -> STT s m (Entry s c a) equateEntry Equiv {combDesc = mkDesc} repx@(Entry rx) repy@(Entry ry) = if (rx /= ry) then do dx@Root{entryWeight = wx, entryDesc = chx, entryValue = vx} <- readSTRef rx @@ -263,7 +264,7 @@ -combineEntries :: (Monad m, Ord a) +combineEntries :: (Monad m, Applicative m, Ord a) => Equiv s c a -> [b] -> (b -> STT s m (Entry s c a)) -> STT s m () combineEntries _ [] _ = return () combineEntries eq (e:es) rep = do @@ -280,7 +281,7 @@ list. Afterwards all elements in the argument list represent the same equivalence class! -} -combineAll :: (Monad m, Ord a) => Equiv s c a -> [Class s c a] -> STT s m () +combineAll :: (Monad m, Applicative m, Ord a) => Equiv s c a -> [Class s c a] -> STT s m () combineAll eq cls = combineEntries eq cls (classRep eq) @@ -289,7 +290,7 @@ class! One of it is returned in order to represent the new combined equivalence class. -} -combine :: (Monad m, Ord a) => Equiv s c a -> Class s c a -> Class s c a -> STT s m (Class s c a) +combine :: (Monad m, Applicative m, Ord a) => Equiv s c a -> Class s c a -> Class s c a -> STT s m (Class s c a) combine eq x y = combineAll eq [x,y] >> return x @@ -297,21 +298,21 @@ unions the equivalence classes of the elements and combines their descriptor. -} -equateAll :: (Monad m, Ord a) => Equiv s c a -> [a] -> STT s m () +equateAll :: (Monad m, Applicative m, Ord a) => Equiv s c a -> [a] -> STT s m () equateAll eq cls = combineEntries eq cls (representative eq) {-| This function equates the two given elements. That is, it unions the equivalence classes of the two elements and combines their descriptor. -} -equate :: (Monad m, Ord a) => Equiv s c a -> a -> a -> STT s m () +equate :: (Monad m, Applicative m, Ord a) => Equiv s c a -> a -> a -> STT s m () equate eq x y = equateAll eq [x,y] {-| This function returns the descriptor of the given equivalence class. -} -desc :: (Monad m, Ord a) => Equiv s c a -> Class s c a -> STT s m c +desc :: (Monad m, Applicative m, Ord a) => Equiv s c a -> Class s c a -> STT s m c desc eq cl = do Entry e <- classRep eq cl liftM entryDesc $ readSTRef e @@ -319,7 +320,7 @@ {-| This function returns the descriptor of the given element's equivalence class. -} -classDesc :: (Monad m, Ord a) => Equiv s c a -> a -> STT s m c +classDesc :: (Monad m, Applicative m, Ord a) => Equiv s c a -> a -> STT s m c classDesc eq val = do Entry e <- representative eq val liftM entryDesc $ readSTRef e @@ -328,7 +329,7 @@ {-| This function decides whether the two given equivalence classes are the same. -} -same :: (Monad m, Ord a) => Equiv s c a -> Class s c a -> Class s c a -> STT s m Bool +same :: (Monad m, Applicative m, Ord a) => Equiv s c a -> Class s c a -> Class s c a -> STT s m Bool same eq c1 c2 = do (Entry r1) <- classRep eq c1 (Entry r2) <- classRep eq c2 @@ -338,7 +339,7 @@ same equivalence class according to the given equivalence relation representation. -} -equivalent :: (Monad m, Ord a) => Equiv s c a -> a -> a -> STT s m Bool +equivalent :: (Monad m, Applicative m, Ord a) => Equiv s c a -> a -> a -> STT s m Bool equivalent eq v1 v2 = do (Entry r1) <- representative eq v1 (Entry r2) <- representative eq v2 @@ -350,13 +351,13 @@ This function modifies the content of a reference cell. -} -modifySTRef :: (Monad m) => STRef s a -> (a -> a) -> STT s m () +modifySTRef :: (Monad m, Applicative m) => STRef s a -> (a -> a) -> STT s m () modifySTRef r f = readSTRef r >>= (writeSTRef r . f) {-| This function marks the given root entry as deleted. -} -removeEntry :: (Monad m, Ord a) => Entry s c a -> STT s m () +removeEntry :: (Monad m, Applicative m, Ord a) => Entry s c a -> STT s m () removeEntry (Entry r) = modifySTRef r change where change e = e {entryDeleted = True} @@ -365,7 +366,7 @@ equivalence class does not exists anymore @False@ is returned; otherwise @True@. -} -remove :: (Monad m, Ord a) => Equiv s c a -> Class s c a -> STT s m Bool +remove :: (Monad m, Applicative m, Ord a) => Equiv s c a -> Class s c a -> STT s m Bool remove eq (Class p) = do entry <- readSTRef p (mrepr,del) <- representative' entry @@ -388,7 +389,7 @@ element. If there is no corresponding equivalence class, @False@ is returned; otherwise @True@. -} -removeClass :: (Monad m, Ord a) => Equiv s c a -> a -> STT s m Bool +removeClass :: (Monad m, Applicative m, Ord a) => Equiv s c a -> a -> STT s m Bool removeClass eq v = do mentry <- getEntry eq v case mentry of @@ -398,4 +399,4 @@ if del then return False else removeEntry (fromMaybe entry mentry) - >> return True \ No newline at end of file + >> return True ++++++ equivalence.cabal ++++++ Name: equivalence Version: 0.3.2 x-revision: 1 License: BSD3 License-File: LICENSE Author: Patrick Bahr Maintainer: [email protected] Homepage: https://github.com/pa-ba/equivalence bug-reports: https://github.com/pa-ba/equivalence/issues/new Synopsis: Maintaining an equivalence relation implemented as union-find using STT. Description: This is an implementation of Tarjan's Union-Find algorithm (Robert E. Tarjan. "Efficiency of a Good But Not Linear Set Union Algorithm", JACM 22(2), 1975) in order to maintain an equivalence relation. This implementation is a port of the /union-find/ package using the ST monad transformer (instead of the IO monad). Category: Algorithms, Data Stability: provisional Build-Type: Simple Cabal-Version: >=1.9.2 Extra-Source-Files: CHANGES.txt source-repository head type: git location: https://github.com/pa-ba/equivalence Test-Suite test Type: exitcode-stdio-1.0 Main-is: Data_Test.hs Other-Modules: Data.Equivalence.Monad_Test hs-source-dirs: src testsuite/tests Build-Depends: base >= 4, template-haskell, containers, mtl >= 2.0.1, QuickCheck >= 2, test-framework, test-framework-quickcheck2, STMonadTrans >= 0.4.3, transformers >= 0.2, transformers-compat >= 0.3 Library Build-Depends: base >= 4 && < 5, containers, mtl >= 2.0.1, STMonadTrans >= 0.4.3, transformers >= 0.2, transformers-compat >= 0.3 Exposed-Modules: Data.Equivalence.STT, Data.Equivalence.Monad Hs-Source-Dirs: src
