packages feed

pcre2 1.0.1.1 → 1.0.2

raw patch · 5 files changed

+30/−11 lines, 5 filesdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,5 +1,10 @@ # Changelog and Acknowledgements +## 1.0.2+* Fixed [#4](https://github.com/sjshuck/pcre2/4), where multiple named captures+  were not type-indexed correctly.+* Established automated builds using Github Workflows.  Thanks amesgen!+ ## 1.0.1.1 * Temporarily eliminate all dependency version bounds to get it building on   Hackage.
README.md view
@@ -1,7 +1,9 @@ # pcre2 +![CI](https://github.com/sjshuck/hs-pcre2/workflows/CI/badge.svg)+[![Hackage](https://img.shields.io/hackage/v/pcre2)](https://hackage.haskell.org/package/pcre2)+ Regular expressions for Haskell.  -https://hackage.haskell.org/package/pcre2  ## Teasers ```haskell@@ -52,10 +54,9 @@  ## TODO * Global matching.  (We already have global substitution.)-* Many performance optimizations.  Currently we are 2–3× slower-  than other libraries doing everything (a few μs).+* Many performance optimizations.  Currently we are 2–3× slower than+  other libraries doing most things (order of a few μs). * Make use of DFA and JIT compilation.-* Establish automated builds. * Improve PCRE2 C compile time. * PCRE2 10.36 is out already. @@ -63,5 +64,5 @@ [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.html).   PCRE2 is distributed under the [3-clause BSD](https://www.pcre.org/licence.txt) license. -## Author+## Main Author ©2020 Shlomo Shuck
pcre2.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: b22fb09f2fba52f4b967f09eae3038c45979bf865405d1e372f7af9f6619e43b+-- hash: 9e2fa347c266eb48c8d78b48cae7cbadf7ea4bf1414ecafc9fbaeb5e2a7c492c  name:           pcre2-version:        1.0.1.1+version:        1.0.2 synopsis:       Regular expressions via the PCRE2 C library (included) description:    Please see the README on GitHub at <https://github.com/sjshuck/hs-pcre2> category:       Text@@ -144,7 +144,7 @@       src/c/pcre2/src/pcre2_valid_utf.c       src/c/pcre2/src/pcre2_xclass.c   build-depends:-      base >=4.7 && <5+      base >=4.9 && <5     , containers     , mtl     , template-haskell@@ -160,7 +160,7 @@       test   ghc-options: -threaded -rtsopts -with-rtsopts=-N   build-depends:-      base >=4.7 && <5+      base >=4.9 && <5     , containers     , hspec     , microlens-platform@@ -179,7 +179,7 @@       bench   ghc-options: -threaded -rtsopts -with-rtsopts=-N   build-depends:-      base >=4.7 && <5+      base >=4.9 && <5     , containers     , criterion     , microlens-platform
src/hs/Text/Regex/Pcre2/Internal.hs view
@@ -1242,7 +1242,7 @@             num      CaptNum (name :: Symbol) '(_, '(name, num) ': _) = num-    CaptNum (name :: Symbol) '(hi, _ ': kvs) = 1 + CaptNum name '(hi, kvs)+    CaptNum (name :: Symbol) '(hi, _ ': kvs) = CaptNum name '(hi, kvs)     CaptNum (name :: Symbol) _ = TypeError         (TypeLits.Text "No capture named " :<>: ShowType name) 
test/Spec.hs view
@@ -189,6 +189,19 @@         it "permits other captures to be changed via Traversal'" $ do             ("" & [_regex|(a)?|] . _capture @0 .~ "foo") `shouldBe` "foo" +    describe "bug fixes" bugFixes++bugFixes :: Spec+bugFixes = do+    issue 4 $ do+        let f = fmap (capture @"b") . [regex|(?<a>a)|(?<b>b)|]+        f "a" `shouldReturn` ""+        f "b" `shouldReturn` "b"++    where+    issue :: Int -> Expectation -> Spec+    issue n = it $ "https://github.com/sjshuck/issues/" ++ show n+ onlyCausesOneCompilation :: (Option -> Text -> a) -> Expectation onlyCausesOneCompilation regexWithOpt = do     counter <- newIORef (0 :: Int)