Hello community, here is the log from the commit of package ghc-pcre-heavy for openSUSE:Factory checked in at 2016-03-26 15:26:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-pcre-heavy (Old) and /work/SRC/openSUSE:Factory/.ghc-pcre-heavy.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-pcre-heavy" Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-pcre-heavy/ghc-pcre-heavy.changes 2016-01-08 15:22:49.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-pcre-heavy.new/ghc-pcre-heavy.changes 2016-03-26 15:26:22.000000000 +0100 @@ -1,0 +2,5 @@ +Wed Mar 16 09:16:02 UTC 2016 - mimi...@gmail.com + +- update to 1.0.0.2 + +------------------------------------------------------------------- Old: ---- pcre-heavy-1.0.0.1.tar.gz New: ---- pcre-heavy-1.0.0.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-pcre-heavy.spec ++++++ --- /var/tmp/diff_new_pack.2uB27D/_old 2016-03-26 15:26:23.000000000 +0100 +++ /var/tmp/diff_new_pack.2uB27D/_new 2016-03-26 15:26:23.000000000 +0100 @@ -20,7 +20,7 @@ %bcond_with tests Name: ghc-pcre-heavy -Version: 1.0.0.1 +Version: 1.0.0.2 Release: 0 Summary: A regexp library on top of pcre-light you can actually use Group: System/Libraries ++++++ pcre-heavy-1.0.0.1.tar.gz -> pcre-heavy-1.0.0.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pcre-heavy-1.0.0.1/library/Text/Regex/PCRE/Heavy.hs new/pcre-heavy-1.0.0.2/library/Text/Regex/PCRE/Heavy.hs --- old/pcre-heavy-1.0.0.1/library/Text/Regex/PCRE/Heavy.hs 2015-09-03 01:44:49.000000000 +0200 +++ new/pcre-heavy-1.0.0.2/library/Text/Regex/PCRE/Heavy.hs 2016-03-15 21:56:17.000000000 +0100 @@ -1,7 +1,10 @@ {-# OPTIONS_GHC -fno-warn-orphans -fno-warn-unused-binds #-} {-# LANGUAGE NoImplicitPrelude, UndecidableInstances, FlexibleInstances, FlexibleContexts, BangPatterns #-} {-# LANGUAGE TemplateHaskell, QuasiQuotes, UnicodeSyntax #-} -{-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE ForeignFunctionInterface, CPP #-} +#if __GLASGOW_HASKELL__ < 710 +{-# LANGUAGE OverlappingInstances #-} +#endif -- | A usable regular expressions library on top of pcre-light. module Text.Regex.PCRE.Heavy ( @@ -70,7 +73,7 @@ (≈) = (=~) -- | Does raw PCRE matching (you probably shouldn't use this directly). --- +-- -- >>> :set -XOverloadedStrings -- >>> rawMatch [re|\w{2}|] "a a ab abc ba" 0 [] -- Just [(4,6)] @@ -202,6 +205,9 @@ -- -- >>> gsub [re|bad|] "xxxbad" "this is bad, right? bad" :: String -- "this is xxxbad, right? xxxbad" +-- +-- >>> gsub [re|a|] "" "aaa" :: String +-- "" gsub ∷ (ConvertibleStrings SBS a, ConvertibleStrings a SBS, RegexReplacement r) ⇒ Regex → r → a → a gsub r t s = gsubO r [] t s @@ -209,11 +215,15 @@ gsubO ∷ (ConvertibleStrings SBS a, ConvertibleStrings a SBS, RegexReplacement r) ⇒ Regex → [PCREExecOption] → r → a → a gsubO r opts t s = cs $ loop 0 str where str = toSBS s - loop offset acc = - case rawSub r t acc offset opts of + loop offset acc + | offset >= l = acc + | otherwise = case rawSub r t acc offset opts of Just (result, newOffset) → - if newOffset == offset then acc else loop newOffset result + if newOffset == offset && l == BS.length result + then acc + else loop newOffset result _ → acc + where l = BS.length acc -- | Splits the string using the given regex. -- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pcre-heavy-1.0.0.1/pcre-heavy.cabal new/pcre-heavy-1.0.0.2/pcre-heavy.cabal --- old/pcre-heavy-1.0.0.1/pcre-heavy.cabal 2015-09-03 01:46:09.000000000 +0200 +++ new/pcre-heavy-1.0.0.2/pcre-heavy.cabal 2016-03-15 22:42:20.000000000 +0100 @@ -1,5 +1,5 @@ name: pcre-heavy -version: 1.0.0.1 +version: 1.0.0.2 synopsis: A regexp library on top of pcre-light you can actually use. description: A regular expressions library that does not suck.