regex-base 0.71 → 0.72.0.1
raw patch · 4 files changed
+42/−13 lines, 4 filesdep +arraydep +bytestringdep ~basesetup-changed
Dependencies added: array, bytestring
Dependency ranges changed: base
Files
- Setup.hs +0/−6
- Setup.lhs +11/−0
- Text/Regex/Base/Context.hs +10/−1
- regex-base.cabal +21/−6
− Setup.hs
@@ -1,6 +0,0 @@-#!/usr/bin/env runhaskell---- I usually compile this with "ghc --make -o setup Setup.hs"--import Distribution.Simple(defaultMain)-main = defaultMain
+ Setup.lhs view
@@ -0,0 +1,11 @@+#!/usr/bin/env runhaskell++> -- I usually compile this with "ghc --make -o setup Setup.hs"++> module Main (main) where+>+> import Distribution.Simple+>+> main :: IO ()+> main = defaultMain+
Text/Regex/Base/Context.hs view
@@ -185,9 +185,12 @@ match r s = maybe (-1,0) (!0) (matchOnce r s) matchM r s = maybe regexFailed (return.(!0)) (matchOnce r s) +#if __GLASGOW_HASKELL__+-- overlaps with instance (RegexLike a b) => RegexContext a b (Array Int b) instance (RegexLike a b) => RegexContext a b MatchArray where match r s = maybe nullArray id (matchOnce r s) matchM r s = maybe regexFailed return (matchOnce r s)+#endif instance (RegexLike a b) => RegexContext a b (b,MatchText b,b) where match r s = maybe (s,nullArray,empty) id (matchOnceText r s)@@ -216,21 +219,27 @@ , mrMatch = whole , mrAfter = post , mrSubs = fmap fst ma- , mrSubList = tail (map fst subs) })+ , mrSubList = map fst subs }) -- ** Instances based on matchAll,matchAllText +#if __GLASGOW_HASKELL__+-- overlaps with instance (RegexLike a b) => RegexContext a b [Array Int b] instance (RegexLike a b) => RegexContext a b [MatchArray] where match = matchAll matchM = nullFail+#endif instance (RegexLike a b) => RegexContext a b [MatchText b] where match = matchAllText matchM = nullFail +#if __GLASGOW_HASKELL__+-- overlaps with instance (RegexLike a b) => RegexContext a b [b] instance (RegexLike a b) => RegexContext a b [(MatchOffset,MatchLength)] where match r s = [ ma!0 | ma <- matchAll r s ] matchM = nullFail+#endif instance (RegexLike a b) => RegexContext a b [b] where match r s = [ fst (ma!0) | ma <- matchAllText r s ]
regex-base.cabal view
@@ -2,7 +2,7 @@ -- To fix for cabal < 1.1.4 comment out the Extra-Source-Files line -- **************************************************************** Name: regex-base-Version: 0.71+Version: 0.72.0.1 -- Cabal-Version: >=1.1.4 License: BSD3 License-File: LICENSE@@ -16,21 +16,36 @@ Description: Interface API for regex-posix,pcre,parsec,dfa Category: Text Tested-With: GHC-Build-Depends: base >= 2.0+Build-Type: Simple+Cabal-Version: >=1.2++Flag split-base+Flag bytestring-in-base++Library+ if flag(split-base)+ Build-Depends: base >= 3, array+ else+ Build-Depends: base < 3+ if flag(bytestring-in-base)+ Build-Depends: base >= 2 && < 3+ else+ Build-Depends: base < 2 || >= 3, bytestring -- Data-Files: -- Extra-Source-Files: Text/Regex/Lazy/TestCompat.hs, Text/Regex/Lazy/TestFull.hs, Text/Regex/Impl/TestContext.hs, TestTextRegexLazy.hs, Example.hs, Example2.hs, lazy.html, README, Makefile -- Extra-Tmp-Files:-Exposed-Modules: Text.Regex.Base+ Exposed-Modules: Text.Regex.Base Text.Regex.Base.RegexLike Text.Regex.Base.Context Text.Regex.Base.Impl-Buildable: True+ Buildable: True -- Other-Modules: -- ********* Be backward compatible until 6.4.2 is futher deployed -- HS-Source-Dirs: "."-Extensions: MultiParamTypeClasses, FunctionalDependencies+ Extensions: MultiParamTypeClasses, FunctionalDependencies, CPP -- GHC-Options: -Wall -Werror-GHC-Options: -Wall -Werror -O2+-- GHC-Options: -Wall -Werror -O2+ GHC-Options: -Wall -O2 -- GHC-Options: -Wall -ddump-minimal-imports -- GHC-Prog-Options: -- Hugs-Options: