fix the regexpr version fix, we really do require 0.5.1
This commit is contained in:
parent
acbb669bcc
commit
3699343318
@ -36,7 +36,7 @@ import Debug.Trace
|
|||||||
import Test.HUnit
|
import Test.HUnit
|
||||||
import Text.Printf
|
import Text.Printf
|
||||||
import Text.Regex
|
import Text.Regex
|
||||||
import Text.RegexPR hiding (gsubRegexPRBy)
|
import Text.RegexPR
|
||||||
import Text.ParserCombinators.Parsec
|
import Text.ParserCombinators.Parsec
|
||||||
|
|
||||||
|
|
||||||
@ -120,14 +120,6 @@ containsRegex r s = case matchRegex r s of
|
|||||||
Just _ -> True
|
Just _ -> True
|
||||||
otherwise -> False
|
otherwise -> False
|
||||||
|
|
||||||
-- regexpr-0.5.1 includes this now, keep a little longer to minimise installation pain
|
|
||||||
-- | Replace all occurrences of a regexp in string using the given replacement function
|
|
||||||
gsubRegexPRBy :: String -> (String -> String) -> String -> String
|
|
||||||
gsubRegexPRBy pat f str =
|
|
||||||
case (matchRegexPR pat str) of
|
|
||||||
Just ((match, (before,after)), _) -> before ++ f match ++ gsubRegexPRBy pat f after
|
|
||||||
Nothing -> str
|
|
||||||
|
|
||||||
|
|
||||||
-- lists
|
-- lists
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,7 @@ Extra-Tmp-Files:
|
|||||||
Cabal-Version: >= 1.2
|
Cabal-Version: >= 1.2
|
||||||
|
|
||||||
Executable hledger
|
Executable hledger
|
||||||
Build-Depends: base, containers, haskell98, directory, parsec, regex-compat, regexpr,
|
Build-Depends: base, containers, haskell98, directory, parsec, regex-compat, regexpr>=0.5.1,
|
||||||
old-locale, time, HUnit, vty==3.1.2, mtl, bytestring
|
old-locale, time, HUnit, vty==3.1.2, mtl, bytestring
|
||||||
Main-Is: hledger.hs
|
Main-Is: hledger.hs
|
||||||
Other-Modules:
|
Other-Modules:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user