regex-examples 1.0.1.4 → 1.0.1.5
raw patch · 8 files changed
+49/−8 lines, 8 files
Files
- README.md +2/−1
- changelog +3/−0
- examples/re-tests.lhs +33/−0
- examples/re-tutorial-replacing.lhs +2/−2
- examples/re-tutorial.lhs +4/−0
- lib/mega-regex.cabal +2/−2
- lib/version.txt +1/−1
- regex-examples.cabal +2/−2
README.md view
@@ -39,7 +39,8 @@ - [X] 2017-06-04 v1.0.1.1 [Fix 1.0.1.0 release bug and provisionally fix UTF8/PCRE interworking](https://github.com/iconnect/regex/milestone/20) - [X] 2017-06-05 v1.0.1.2 [Permit utf8-string-1](https://github.com/iconnect/regex/milestone/21) - [X] 2017-06-05 v1.0.1.3 [Suspend Windows tests for PCRE on UTF-8 text](https://github.com/iconnect/regex/milestone/22)-- [ ] 2017-08-31 v2.0.0.0 [Fast text replacement with benchmarks](https://github.com/iconnect/regex/milestone/4)+- [X] 2018-12-14 v1.0.1.4 [Fix for GHC 8.4.4, GHC-8.6.2](https://github.com/iconnect/regex/milestone/23)+- [X] 2018-12-18 v1.0.1.5 [TDFA quasi quoters not dealing with \n, etc.](https://github.com/iconnect/regex/milestone/24) See the [Roadmap page](http://roadmap.regex.uk) for details.
changelog view
@@ -1,5 +1,8 @@ -*-change-log-*- +1.0.1.5 Chris Dornan <chris.dornan@irisconnect.co.uk> 2018-12-18+ * TDFA quasi quoters not dealing with \n, etc. (#157)+ 1.0.1.4 Chris Dornan <chris.dornan@irisconnect.co.uk> 2018-12-14 * GHC-8.4.4, GHC-8.6.2 (#160)
examples/re-tests.lhs view
@@ -93,6 +93,7 @@ , escape_tests , add_capture_names_tests , find_tests+ , backslash_tests , misc_tests ] \end{code}@@ -789,6 +790,38 @@ , combineDM = (</>) } +\end{code}+++The Backslash Tests+-------------------++\begin{code}+backslash_tests :: TestTree+backslash_tests = testGroup "Backslash Tests"+ [ testGroup "PCRE"+ [ testCase "backslash-a" $ "\ay" @=? "--foo\ay" P_TX.*=~/ [P_TX.edBlockSensitive|--[^\a]*///|]+ , testCase "backslash-b" $ "\by" @=? "--foo\by" P_TX.*=~/ [P_TX.edBlockSensitive|--[^\b]*///|]+ , testCase "backslash-f" $ "\fy" @=? "--foo\fy" P_TX.*=~/ [P_TX.edBlockSensitive|--[^\f]*///|]+ , testCase "backslash-n" $ "\ny" @=? "--foo\ny" P_TX.*=~/ [P_TX.edBlockSensitive|--[^\n]*///|]+ , testCase "backslash-r" $ "\ry" @=? "--foo\ry" P_TX.*=~/ [P_TX.edBlockSensitive|--[^\r]*///|]+ , testCase "backslash-t" $ "\ty" @=? "--foo\ty" P_TX.*=~/ [P_TX.edBlockSensitive|--[^\t]*///|]+ , testCase "backslash-v" $ "\vy" @=? "--foo\vy" P_TX.*=~/ [P_TX.edBlockSensitive|--[^\v]*///|]+ , testCase "backslash-$" $ "$y" @=? "--foo$y" P_TX.*=~/ [P_TX.edBlockSensitive|--[^\$]*///|]+ , testCase "backslash-backslash" $ "\\y" @=? "--foo\\y" P_TX.*=~/ [P_TX.edBlockSensitive|--[^\\]*///|]+ ]+ , testGroup "TDFA"+ [ testCase "backslash-a" $ "\ay" @=? "--foo\ay" T_TX.*=~/ [T_TX.edBlockSensitive|--[^\a]*///|]+ , testCase "backslash-b" $ "\by" @=? "--foo\by" T_TX.*=~/ [T_TX.edBlockSensitive|--[^\b]*///|]+ , testCase "backslash-f" $ "\fy" @=? "--foo\fy" T_TX.*=~/ [T_TX.edBlockSensitive|--[^\f]*///|]+ , testCase "backslash-n" $ "\ny" @=? "--foo\ny" T_TX.*=~/ [T_TX.edBlockSensitive|--[^\n]*///|]+ , testCase "backslash-r" $ "\ry" @=? "--foo\ry" T_TX.*=~/ [T_TX.edBlockSensitive|--[^\r]*///|]+ , testCase "backslash-t" $ "\ty" @=? "--foo\ty" T_TX.*=~/ [T_TX.edBlockSensitive|--[^\t]*///|]+ , testCase "backslash-v" $ "\vy" @=? "--foo\vy" T_TX.*=~/ [T_TX.edBlockSensitive|--[^\v]*///|]+ , testCase "backslash-$" $ "$y" @=? "--foo$y" T_TX.*=~/ [T_TX.edBlockSensitive|--[^\$]*///|]+ , testCase "backslash-backslash" $ "\\y" @=? "--foo\\y" T_TX.*=~/ [T_TX.edBlockSensitive|--[^\\]*///|]+ ]+ ] \end{code}
examples/re-tutorial-replacing.lhs view
@@ -5,7 +5,7 @@ Language Options and Imports ----------------------------- -This tutorial is a literate Haskell program where we start by specifying+This tutorial is a literate Haskell program whwre we start by specifying the language pragmas and imports we will need for this module. \begin{code}@@ -83,7 +83,7 @@ --------------------- The types returned by the `?=~` and `*=~` form the foundations of the-package. Understanding these simple types is the key to understanding+package. Understandingv these simple types is the key to understanding the package. The type of `*=~` in this module (imported from
examples/re-tutorial.lhs view
@@ -44,6 +44,10 @@ is for you, otherwise it is the PCRE back end, which is housed in a seperate `regex-with-pcre` package. + 2. Which Haskell type is being used for the text I need to match? This+ can influence as, at the time of writing, the `PCRE` `regex` back end+ [does not support the`Text` types](https://github.com/iconnect/regex/issues/58).+ The import statement will in general look like this ``` import Text.RE.<back-end>.<text-type>
lib/mega-regex.cabal view
@@ -1,5 +1,5 @@ Name: regex-Version: 1.0.1.4+Version: 1.0.1.5 Synopsis: Toolkit for regex-base Description: A regular expression toolkit for regex-base with compile-time checking of RE syntax, data types for@@ -68,7 +68,7 @@ Source-Repository this Type: git Location: https://github.com/iconnect/regex.git- Tag: 1.0.1.4+ Tag: 1.0.1.5
lib/version.txt view
@@ -1,1 +1,1 @@-1.0.1.4+1.0.1.5
regex-examples.cabal view
@@ -1,5 +1,5 @@ Name: regex-examples-Version: 1.0.1.4+Version: 1.0.1.5 Synopsis: Tutorial, tests and example programs for regex Description: Tutorial, tests and example programs for regex, a Regular Expression Toolkit for regex-base with@@ -68,7 +68,7 @@ Source-Repository this Type: git Location: https://github.com/iconnect/regex.git- Tag: 1.0.1.4+ Tag: 1.0.1.5 Executable re-gen-cabals