regex 0.10.0.2 → 0.10.0.3
raw patch · 6 files changed
+62/−17 lines, 6 filesPVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
API changes (from Hackage documentation)
+ Text.RE.TDFA: escapeREString :: String -> String
Files
- README.markdown +2/−0
- Text/RE.hs +7/−7
- Text/RE/TDFA.hs +32/−7
- Text/RE/TDFA/RE.hs +15/−1
- changelog +4/−0
- regex.cabal +2/−2
README.markdown view
@@ -66,6 +66,8 @@ ☒ 2017-03-27 v0.10.0.2 [Tweak Templates, Fix release scripts and update Haddocks commentary](https://github.com/iconnect/regex/milestone/12) + ☒ 2017-03-28 v0.10.0.3 [Upgrade to LTS 8.6 and Improve Haddocks for Text.RE.{TDFA,PCRE}](https://github.com/iconnect/regex/milestone/13)+ ☐ 2017-03-31 v1.0.0.0 [First stable release](https://github.com/iconnect/regex/milestone/3) ☐ 2017-08-31 v2.0.0.0 [Fast text replacement with benchmarks](https://github.com/iconnect/regex/milestone/4)
Text/RE.hs view
@@ -53,7 +53,6 @@ -- While we aim to provide all combinations of these choices, some of them -- are currently not available. In the regex package we have: ----- * "Text.RE.TDFA" -- * "Text.RE.TDFA.ByteString" -- * "Text.RE.TDFA.ByteString.Lazy" -- * "Text.RE.TDFA.RE"@@ -61,13 +60,14 @@ -- * "Text.RE.TDFA.String" -- * "Text.RE.TDFA.Text" -- * "Text.RE.TDFA.Text.Lazy"+-- * "Text.RE.TDFA" -- -- The PCRE modules are contained in the separate @regex-with-pcre@ -- package: ----- * "Text.RE.PCRE"--- * "Text.RE.PCRE.ByteString"--- * "Text.RE.PCRE.ByteString.Lazy"--- * "Text.RE.PCRE.RE"--- * "Text.RE.PCRE.Sequence"--- * "Text.RE.PCRE.String"+-- * Text.RE.PCRE.ByteString+-- * Text.RE.PCRE.ByteString.Lazy+-- * Text.RE.PCRE.RE+-- * Text.RE.PCRE.Sequence+-- * Text.RE.PCRE.String+-- * Text.RE.PCRE
Text/RE/TDFA.hs view
@@ -10,7 +10,10 @@ ( -- * Tutorial -- $tutorial- --++ -- * About this Module+ -- $about+ -- * The Match Operators (*=~) , (?=~)@@ -40,6 +43,7 @@ , compileRegexWith , escape , escapeWith+ , escapeREString , module Text.RE.TDFA.RE -- * The [ed| ... |] quasi quoters , module Text.RE.Internal.SearchReplace.TDFA@@ -70,7 +74,10 @@ import Text.RE.Types.REOptions --- | find all matches in text+-- | find all matches in text; e.g., to count the number of naturals in s:+--+-- @countMatches $ s *=~ [re|[0-9]+|]@+-- (*=~) :: IsRegex RE s => s -> RE@@ -84,14 +91,18 @@ -> Match s (?=~) bs rex = addCaptureNamesToMatch (reCaptureNames rex) $ matchOnce rex bs --- | search and replace once-(?=~/) :: IsRegex RE s => s -> SearchReplace RE s -> s-(?=~/) = flip searchReplaceFirst---- | search and replace, all occurrences+-- | search and replace all occurrences; e.g., this section will yield a function to+-- convert every a YYYY-MM-DD into a DD/MM/YYYY:+--+-- @(*=~/ [ed|${y}([0-9]{4})-0*${m}([0-9]{2})-0*${d}([0-9]{2})///${d}/${m}/${y}|])@+-- (*=~/) :: IsRegex RE s => s -> SearchReplace RE s -> s (*=~/) = flip searchReplaceAll +-- | search and replace the first occurrence only+(?=~/) :: IsRegex RE s => s -> SearchReplace RE s -> s+(?=~/) = flip searchReplaceFirst+ -- | the regex-base polymorphic match operator (=~) :: ( B.RegexContext TDFA.Regex s a , B.RegexMaker TDFA.Regex TDFA.CompOption TDFA.ExecOption s@@ -113,6 +124,20 @@ -- $tutorial -- We have a regex tutorial at <http://tutorial.regex.uk>.++-- $about+-- This module provides access to the back end through polymorphic functions+-- that operate over all of the String/Text/ByteString types supported by the+-- back end. If you don't need this generality you might want to consider+-- using one of the modules that have been specialised for each of these types:+--+-- * "Text.RE.TDFA.ByteString"+-- * "Text.RE.TDFA.ByteString.Lazy"+-- * "Text.RE.TDFA.RE"+-- * "Text.RE.TDFA.Sequence"+-- * "Text.RE.TDFA.String"+-- * "Text.RE.TDFA.Text"+-- * "Text.RE.TDFA.Text.Lazy" -- $instances --
Text/RE/TDFA/RE.hs view
@@ -15,7 +15,10 @@ {-# OPTIONS_GHC -fno-warn-orphans #-} module Text.RE.TDFA.RE- ( -- * RE Type+ ( -- * About+ -- $about++ -- * RE Type RE , regexType , reOptions@@ -413,3 +416,14 @@ def_exec_option :: ExecOption def_exec_option = optionsExec defaultREOptions+++------------------------------------------------------------------------+-- Haddock Sections+------------------------------------------------------------------------++-- $about+--+-- This module provides the regex PCRE back end. Most of the functions that+-- you will need for day to day use are provided by the primary API modules+-- (e.g., "Text.RE.TDFA.Text").
changelog view
@@ -1,5 +1,9 @@ -*-change-log-*- +0.10.0.3 Chris Dornan <chris.dornan@irisconnect.co.uk> 2017-03-28+ * Update to LTS-8.6 (#95)+ * Improve Haddocks for Text.RE.{TDFA,PCRE} (#94)+ 0.10.0.2 Chris Dornan <chris.dornan@irisconnect.co.uk> 2017-03-27 * Constrain the types of the template quasi quoters (#86) * Add escape methods to IsRegex (#87)
regex.cabal view
@@ -1,5 +1,5 @@ Name: regex-Version: 0.10.0.2+Version: 0.10.0.3 Synopsis: Toolkit for regex-base Description: A Regular Expression Toolkit for regex-base with Compile-time checking of RE syntax, data types for@@ -31,7 +31,7 @@ Source-Repository this Type: git Location: https://github.com/iconnect/regex.git- Tag: 0.10.0.2+ Tag: 0.10.0.3