Hello community, here is the log from the commit of package ghc-regex-tdfa for openSUSE:Factory checked in at 2018-05-30 12:12:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-regex-tdfa (Old) and /work/SRC/openSUSE:Factory/.ghc-regex-tdfa.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-regex-tdfa" Wed May 30 12:12:08 2018 rev:5 rq:607870 version:1.2.3 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-regex-tdfa/ghc-regex-tdfa.changes 2017-09-15 22:09:22.364897100 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-regex-tdfa.new/ghc-regex-tdfa.changes 2018-05-30 12:27:01.186873018 +0200 @@ -1,0 +2,6 @@ +Mon May 14 17:02:11 UTC 2018 - [email protected] + +- Update regex-tdfa to version 1.2.3. + * Added `Semigroup` instances for some types. + +------------------------------------------------------------------- Old: ---- regex-tdfa-1.2.2.tar.gz New: ---- regex-tdfa-1.2.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-regex-tdfa.spec ++++++ --- /var/tmp/diff_new_pack.cKZXPe/_old 2018-05-30 12:27:01.742853866 +0200 +++ /var/tmp/diff_new_pack.cKZXPe/_new 2018-05-30 12:27:01.742853866 +0200 @@ -1,7 +1,7 @@ # # spec file for package ghc-regex-tdfa # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 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 @@ -18,7 +18,7 @@ %global pkg_name regex-tdfa Name: ghc-%{pkg_name} -Version: 1.2.2 +Version: 1.2.3 Release: 0 Summary: Replaces/Enhances Text.Regex License: BSD-3-Clause @@ -64,7 +64,7 @@ %ghc_pkg_recache %files -f %{name}.files -%doc LICENSE +%license LICENSE %files devel -f %{name}-devel.files %doc CHANGELOG.md ++++++ regex-tdfa-1.2.2.tar.gz -> regex-tdfa-1.2.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/regex-tdfa-1.2.2/CHANGELOG.md new/regex-tdfa-1.2.3/CHANGELOG.md --- old/regex-tdfa-1.2.2/CHANGELOG.md 2016-04-28 13:04:18.000000000 +0200 +++ new/regex-tdfa-1.2.3/CHANGELOG.md 2018-03-10 15:00:10.000000000 +0100 @@ -1,3 +1,7 @@ +# 1.2.3 + +* Added `Semigroup` instances for some types (h/t Herbert Valerio Riedel). + # 1.2.2 * New maintainer. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/regex-tdfa-1.2.2/Data/IntMap/CharMap2.hs new/regex-tdfa-1.2.3/Data/IntMap/CharMap2.hs --- old/regex-tdfa-1.2.2/Data/IntMap/CharMap2.hs 2016-04-28 13:04:18.000000000 +0200 +++ new/regex-tdfa-1.2.3/Data/IntMap/CharMap2.hs 2018-03-10 14:59:08.000000000 +0100 @@ -10,7 +10,7 @@ import Data.List as L (map) import qualified Data.IntMap as M import qualified Data.IntSet as S(IntSet) -import Data.Monoid(Monoid(..)) +import Data.Semigroup as Sem #ifndef __GLASGOW_HASKELL__ unsafeChr = chr @@ -18,9 +18,12 @@ newtype CharMap a = CharMap {unCharMap :: M.IntMap a} deriving (Eq,Ord,Read,Show) +instance Sem.Semigroup (CharMap a) where + CharMap x <> CharMap y = CharMap (x `mappend` y) + instance Monoid (CharMap a) where mempty = CharMap mempty - CharMap x `mappend` CharMap y = CharMap (x `mappend` y) + mappend = (<>) instance Functor CharMap where fmap f (CharMap m) = CharMap (fmap f m) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/regex-tdfa-1.2.2/Data/IntMap/EnumMap2.hs new/regex-tdfa-1.2.3/Data/IntMap/EnumMap2.hs --- old/regex-tdfa-1.2.2/Data/IntMap/EnumMap2.hs 2016-04-28 13:04:18.000000000 +0200 +++ new/regex-tdfa-1.2.3/Data/IntMap/EnumMap2.hs 2018-03-10 14:59:08.000000000 +0100 @@ -3,16 +3,19 @@ import Data.Foldable(Foldable(..)) import qualified Data.IntMap as M import qualified Data.IntSet.EnumSet2 as S (EnumSet(..)) -import Data.Monoid(Monoid(..)) +import Data.Semigroup as Sem import Prelude import qualified Prelude as L (map) newtype EnumMap k a = EnumMap {unEnumMap :: M.IntMap a} deriving (Eq,Ord,Read,Show) +instance Ord k => Sem.Semigroup (EnumMap k a) where + EnumMap x <> EnumMap y = EnumMap (x `mappend` y) + instance Ord k => Monoid (EnumMap k a) where mempty = EnumMap mempty - EnumMap x `mappend` EnumMap y = EnumMap (x `mappend` y) + mappend = (<>) instance Ord k => Functor (EnumMap k) where fmap f (EnumMap m) = EnumMap (fmap f m) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/regex-tdfa-1.2.2/Data/IntSet/EnumSet2.hs new/regex-tdfa-1.2.3/Data/IntSet/EnumSet2.hs --- old/regex-tdfa-1.2.2/Data/IntSet/EnumSet2.hs 2016-04-28 13:04:18.000000000 +0200 +++ new/regex-tdfa-1.2.3/Data/IntSet/EnumSet2.hs 2018-03-10 14:59:08.000000000 +0100 @@ -2,14 +2,17 @@ import qualified Data.IntSet as S import qualified Data.List as L (map) -import Data.Monoid(Monoid(..)) +import Data.Semigroup as Sem newtype EnumSet e = EnumSet {unEnumSet :: S.IntSet} deriving (Eq,Ord,Read,Show) +instance Sem.Semigroup (EnumSet e) where + EnumSet x <> EnumSet y = EnumSet (x `mappend` y) + instance Monoid (EnumSet e) where mempty = EnumSet mempty - EnumSet x `mappend` EnumSet y = EnumSet (x `mappend` y) + mappend = (<>) (\\) :: (Enum e) => EnumSet e -> EnumSet e -> EnumSet e (\\) (EnumSet s1) (EnumSet s2) = EnumSet ((S.\\) s1 s2) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/regex-tdfa-1.2.2/Text/Regex/TDFA/CorePattern.hs new/regex-tdfa-1.2.3/Text/Regex/TDFA/CorePattern.hs --- old/regex-tdfa-1.2.2/Text/Regex/TDFA/CorePattern.hs 2016-04-28 13:04:18.000000000 +0200 +++ new/regex-tdfa-1.2.3/Text/Regex/TDFA/CorePattern.hs 2018-03-10 14:59:08.000000000 +0100 @@ -42,6 +42,7 @@ --import Data.Maybe(isNothing) import Data.IntSet.EnumSet2(EnumSet) import qualified Data.IntSet.EnumSet2 as Set(singleton,toList,isSubsetOf) +import Data.Semigroup as Sem import Text.Regex.TDFA.Common {- all -} import Text.Regex.TDFA.Pattern(Pattern(..),starTrans) -- import Debug.Trace @@ -87,9 +88,12 @@ -- This is a set of WhichTest where each test has associated pattern location information newtype SetTestInfo = SetTestInfo {getTests :: EnumMap WhichTest (EnumSet DoPa)} deriving (Eq) +instance Semigroup SetTestInfo where + SetTestInfo x <> SetTestInfo y = SetTestInfo (x Sem.<> y) + instance Monoid SetTestInfo where mempty = SetTestInfo mempty - SetTestInfo x `mappend` SetTestInfo y = SetTestInfo (x `mappend` y) + mappend = (Sem.<>) instance Show SetTestInfo where show (SetTestInfo sti) = "SetTestInfo "++show (mapSnd (Set.toList) $ Map.assocs sti) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/regex-tdfa-1.2.2/Text/Regex/TDFA/NewDFA/Engine.hs new/regex-tdfa-1.2.3/Text/Regex/TDFA/NewDFA/Engine.hs --- old/regex-tdfa-1.2.2/Text/Regex/TDFA/NewDFA/Engine.hs 2016-04-28 13:04:18.000000000 +0200 +++ new/regex-tdfa-1.2.3/Text/Regex/TDFA/NewDFA/Engine.hs 2018-03-10 14:59:08.000000000 +0100 @@ -122,6 +122,7 @@ let obtainNext = join (readSTRef storeNext) return obtainNext + goNext :: STRef s (ST s [MatchArray]) -> ST s [MatchArray] goNext storeNext = {-# SCC "goNext" #-} do (SScratch s1In s2In (winQ,blank,which)) <- newScratch b_index b_tags _ <- spawnStart b_tags blank startState s1In offsetIn diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/regex-tdfa-1.2.2/Text/Regex/TDFA/NewDFA/Engine_FA.hs new/regex-tdfa-1.2.3/Text/Regex/TDFA/NewDFA/Engine_FA.hs --- old/regex-tdfa-1.2.2/Text/Regex/TDFA/NewDFA/Engine_FA.hs 2016-04-28 13:04:18.000000000 +0200 +++ new/regex-tdfa-1.2.3/Text/Regex/TDFA/NewDFA/Engine_FA.hs 2018-03-10 14:59:08.000000000 +0100 @@ -86,6 +86,7 @@ comp :: C s comp = {-# SCC "matchHere.comp" #-} ditzyComp'3 aTags + goNext :: ST s [MatchArray] goNext = {-# SCC "goNext" #-} do (SScratch s1In s2In (winQ,blank,which)) <- newScratch b_index b_tags spawnAt b_tags blank startState s1In offsetIn diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/regex-tdfa-1.2.2/regex-tdfa.cabal new/regex-tdfa-1.2.3/regex-tdfa.cabal --- old/regex-tdfa-1.2.2/regex-tdfa.cabal 2016-04-28 13:04:18.000000000 +0200 +++ new/regex-tdfa-1.2.3/regex-tdfa.cabal 2018-03-10 15:04:04.000000000 +0100 @@ -1,5 +1,5 @@ Name: regex-tdfa -Version: 1.2.2 +Version: 1.2.3 License: BSD3 License-File: LICENSE Copyright: Copyright (c) 2007, Christopher Kuklewicz @@ -11,7 +11,7 @@ Synopsis: Replaces/Enhances Text.Regex Description: A new all Haskell "tagged" DFA regex engine, inspired by libtre Category: Text -Tested-With: GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1 +Tested-With: GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1, GHC == 8.2.2, GHC == 8.4.1 Build-Type: Simple extra-source-files: CHANGELOG.md @@ -36,6 +36,17 @@ , parsec , regex-base >= 0.93.1 + -- Support Semigroup instances uniformly + -- + -- See also + -- https://prime.haskell.org/wiki/Libraries/Proposals/SemigroupMonoid#RecommendedVariant + -- + -- NB: This is the same logic `parsec.cabal` uses, so this doesn't + -- add any new dependency that isn't already incurred by + -- `regex-tdfa`'s transitive deps + if !impl(ghc >= 8.0) + build-depends: semigroups == 0.18.* + other-modules: Paths_regex_tdfa Exposed-Modules: Data.IntMap.CharMap2 Data.IntMap.EnumMap2
