stringsearch 0.3.6.1 → 0.3.6.2
raw patch · 3 files changed
+10/−6 lines, 3 files
Files
- CHANGES +2/−0
- Data/ByteString/Search/Substitution.hs +4/−2
- stringsearch.cabal +4/−4
CHANGES view
@@ -1,3 +1,5 @@+0.3.6.2:+- move some INLINE pragmas to make it compile with 7.2.1 0.3.6.1: - fix error in docs 0.3.6:
Data/ByteString/Search/Substitution.hs view
@@ -21,7 +21,6 @@ class Substitution a where -- | @'substitution'@ transforms a value to a substitution function. substitution :: a -> ([S.ByteString] -> [S.ByteString])- {-# INLINE substitution #-} -- | @'prependCycle' sub lazyBS@ shall prepend infinitely many copies -- of @sub@ to @lazyBS@ without entering an infinite loop in case -- of an empty @sub@, so e.g.@@ -33,17 +32,20 @@ -- shall (quickly) evaluate to 'True'. -- For non-empty @sub@, the cycle shall be constructed efficiently. prependCycle :: a -> (L.ByteString -> L.ByteString)- {-# INLINE prependCycle #-} instance Substitution S.ByteString where+ {-# INLINE substitution #-} substitution sub = if S.null sub then id else (sub :)+ {-# INLINE prependCycle #-} prependCycle sub | S.null sub = id | otherwise = let c = LI.Chunk sub c in const c instance Substitution L.ByteString where+ {-# INLINE substitution #-} substitution LI.Empty = id substitution (LI.Chunk c t) = (c :) . flip (LI.foldrChunks (:)) t+ {-# INLINE prependCycle #-} prependCycle sub | L.null sub = id prependCycle sub = let cyc = LI.foldrChunks LI.Chunk cyc sub in const cyc
stringsearch.cabal view
@@ -7,7 +7,7 @@ -- The package version. See the Haskell package versioning policy -- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for -- standards guiding when and how versions should be incremented.-Version: 0.3.6.1+Version: 0.3.6.2 Homepage: https://bitbucket.org/dafis/stringsearch Bug-reports: https://bitbucket.org/dafis/stringsearch/issues@@ -22,7 +22,7 @@ on substrings and replacing all occurrences of a substring (the first in case of overlaps) with another. - GHC before 6.8 are no longer supported, other compilers+ GHC before 6.10 are no longer supported, other compilers only if they support BangPatterns. If you need it to work with other compilers, send a feature request. @@ -52,8 +52,8 @@ -- a README. Extra-source-files: CHANGES -Tested-with: GHC == 6.8.3, GHC == 6.12.1, GHC == 6.12.2,- GHC == 6.12.3, GHC == 7.0.3+Tested-with: GHC == 6.10.4, GHC == 6.12.3, GHC == 7.0.2,+ GHC == 7.0.4, GHC == 7.2.1 -- Constraint on the version of Cabal needed to build this package. Cabal-version: >=1.6