Use regex-tdfa instead of regex-compat-tdfa
This commit is contained in:
parent
7d9e334aa9
commit
7f2ffe2e45
@ -51,7 +51,7 @@ import System.IO.Unsafe (unsafePerformIO)
|
|||||||
import Test.HUnit
|
import Test.HUnit
|
||||||
import Text.ParserCombinators.Parsec
|
import Text.ParserCombinators.Parsec
|
||||||
import Text.Printf
|
import Text.Printf
|
||||||
import Text.Regex
|
import Text.Regex.TDFA
|
||||||
import Text.RegexPR
|
import Text.RegexPR
|
||||||
import Text.Show.Pretty
|
import Text.Show.Pretty
|
||||||
-- import qualified Data.Map as Map
|
-- import qualified Data.Map as Map
|
||||||
@ -246,10 +246,10 @@ regexSplit = splitRegexPR
|
|||||||
|
|
||||||
-- regex-compat (regex-posix) functions that perform better than regexpr.
|
-- regex-compat (regex-posix) functions that perform better than regexpr.
|
||||||
regexMatchesRegexCompat :: String -> String -> Bool
|
regexMatchesRegexCompat :: String -> String -> Bool
|
||||||
regexMatchesRegexCompat r = isJust . matchRegex (mkRegex r)
|
regexMatchesRegexCompat = flip (=~)
|
||||||
|
|
||||||
regexMatchesCIRegexCompat :: String -> String -> Bool
|
regexMatchesCIRegexCompat :: String -> String -> Bool
|
||||||
regexMatchesCIRegexCompat r = isJust . matchRegex (mkRegexWithOpts r True False)
|
regexMatchesCIRegexCompat r = match (makeRegexOpts defaultCompOpt { multiline = True, caseSensitive = False, newSyntax = True } defaultExecOpt r)
|
||||||
|
|
||||||
-- lists
|
-- lists
|
||||||
|
|
||||||
|
|||||||
@ -68,7 +68,7 @@ library
|
|||||||
,old-time
|
,old-time
|
||||||
,parsec
|
,parsec
|
||||||
,pretty-show
|
,pretty-show
|
||||||
,regex-compat-tdfa == 0.95.*
|
,regex-tdfa
|
||||||
,regexpr >= 0.5.1
|
,regexpr >= 0.5.1
|
||||||
,safe >= 0.2
|
,safe >= 0.2
|
||||||
,split >= 0.1 && < 0.3
|
,split >= 0.1 && < 0.3
|
||||||
@ -100,7 +100,7 @@ test-suite tests
|
|||||||
, old-time
|
, old-time
|
||||||
, parsec
|
, parsec
|
||||||
, pretty-show
|
, pretty-show
|
||||||
, regex-compat-tdfa
|
, regex-tdfa
|
||||||
, regexpr
|
, regexpr
|
||||||
, safe
|
, safe
|
||||||
, split
|
, split
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user