regex-with-pcre 0.6.0.1 → 0.7.0.0
raw patch · 9 files changed
+65/−28 lines, 9 filesdep ~regexPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: regex
API changes (from Hackage documentation)
- Text.RE.PCRE.ByteString: instance Text.RE.IsRegex.IsRegex Text.RE.PCRE.RE.RE Data.ByteString.Internal.ByteString
- Text.RE.PCRE.ByteString.Lazy: instance Text.RE.IsRegex.IsRegex Text.RE.PCRE.RE.RE Data.ByteString.Lazy.Internal.ByteString
- Text.RE.PCRE.RE: instance Text.RE.Options.IsOption () Text.RE.PCRE.RE.RE Text.Regex.PCRE.Wrap.CompOption Text.Regex.PCRE.Wrap.ExecOption
- Text.RE.PCRE.RE: instance Text.RE.Options.IsOption (Text.RE.Options.Macros Text.RE.PCRE.RE.RE) Text.RE.PCRE.RE.RE Text.Regex.PCRE.Wrap.CompOption Text.Regex.PCRE.Wrap.ExecOption
- Text.RE.PCRE.RE: instance Text.RE.Options.IsOption Text.RE.Options.SimpleRegexOptions Text.RE.PCRE.RE.RE Text.Regex.PCRE.Wrap.CompOption Text.Regex.PCRE.Wrap.ExecOption
- Text.RE.PCRE.RE: instance Text.RE.Options.IsOption Text.RE.PCRE.RE.Options Text.RE.PCRE.RE.RE Text.Regex.PCRE.Wrap.CompOption Text.Regex.PCRE.Wrap.ExecOption
- Text.RE.PCRE.RE: instance Text.RE.Options.IsOption Text.Regex.PCRE.Wrap.CompOption Text.RE.PCRE.RE.RE Text.Regex.PCRE.Wrap.CompOption Text.Regex.PCRE.Wrap.ExecOption
- Text.RE.PCRE.RE: instance Text.RE.Options.IsOption Text.Regex.PCRE.Wrap.ExecOption Text.RE.PCRE.RE.RE Text.Regex.PCRE.Wrap.CompOption Text.Regex.PCRE.Wrap.ExecOption
- Text.RE.PCRE.Sequence: instance Text.RE.IsRegex.IsRegex Text.RE.PCRE.RE.RE (Data.Sequence.Seq GHC.Types.Char)
- Text.RE.PCRE.String: instance Text.RE.IsRegex.IsRegex Text.RE.PCRE.RE.RE GHC.Base.String
+ Text.RE.PCRE.ByteString: instance Text.RE.Types.IsRegex.IsRegex Text.RE.PCRE.RE.RE Data.ByteString.Internal.ByteString
+ Text.RE.PCRE.ByteString.Lazy: instance Text.RE.Types.IsRegex.IsRegex Text.RE.PCRE.RE.RE Data.ByteString.Lazy.Internal.ByteString
+ Text.RE.PCRE.RE: compileRegexWith :: (Functor m, Monad m) => SimpleRegexOptions -> String -> m RE
+ Text.RE.PCRE.RE: compileRegexWithOptions :: (IsOption o RE CompOption ExecOption, Functor m, Monad m) => o -> String -> m RE
+ Text.RE.PCRE.RE: instance Text.RE.Types.Options.IsOption () Text.RE.PCRE.RE.RE Text.Regex.PCRE.Wrap.CompOption Text.Regex.PCRE.Wrap.ExecOption
+ Text.RE.PCRE.RE: instance Text.RE.Types.Options.IsOption (Text.RE.Types.Options.Macros Text.RE.PCRE.RE.RE) Text.RE.PCRE.RE.RE Text.Regex.PCRE.Wrap.CompOption Text.Regex.PCRE.Wrap.ExecOption
+ Text.RE.PCRE.RE: instance Text.RE.Types.Options.IsOption Text.RE.PCRE.RE.Options Text.RE.PCRE.RE.RE Text.Regex.PCRE.Wrap.CompOption Text.Regex.PCRE.Wrap.ExecOption
+ Text.RE.PCRE.RE: instance Text.RE.Types.Options.IsOption Text.RE.Types.Options.SimpleRegexOptions Text.RE.PCRE.RE.RE Text.Regex.PCRE.Wrap.CompOption Text.Regex.PCRE.Wrap.ExecOption
+ Text.RE.PCRE.RE: instance Text.RE.Types.Options.IsOption Text.Regex.PCRE.Wrap.CompOption Text.RE.PCRE.RE.RE Text.Regex.PCRE.Wrap.CompOption Text.Regex.PCRE.Wrap.ExecOption
+ Text.RE.PCRE.RE: instance Text.RE.Types.Options.IsOption Text.Regex.PCRE.Wrap.ExecOption Text.RE.PCRE.RE.RE Text.Regex.PCRE.Wrap.CompOption Text.Regex.PCRE.Wrap.ExecOption
+ Text.RE.PCRE.Sequence: instance Text.RE.Types.IsRegex.IsRegex Text.RE.PCRE.RE.RE (Data.Sequence.Seq GHC.Types.Char)
+ Text.RE.PCRE.String: instance Text.RE.Types.IsRegex.IsRegex Text.RE.PCRE.RE.RE GHC.Base.String
- Text.RE.PCRE.RE: compileRegex :: (IsOption o RE CompOption ExecOption, Functor m, Monad m) => o -> String -> m RE
+ Text.RE.PCRE.RE: compileRegex :: (Functor m, Monad m) => String -> m RE
Files
- README.markdown +6/−2
- Text/RE/PCRE.hs +2/−1
- Text/RE/PCRE/ByteString.hs +6/−3
- Text/RE/PCRE/ByteString/Lazy.hs +6/−3
- Text/RE/PCRE/RE.hs +23/−10
- Text/RE/PCRE/Sequence.hs +6/−3
- Text/RE/PCRE/String.hs +6/−3
- changelog +7/−0
- regex-with-pcre.cabal +3/−3
README.markdown view
@@ -53,9 +53,13 @@ ☒ 2017-03-13 v0.6.0.0 [Split out PCRE](https://github.com/iconnect/regex/milestone/7) - ☒ 2017-03-13 v0.6.0.1 [Fix .travis.yml release-stack scriptRE](https://github.com/iconnect/regex/milestone/7)+ ☒ 2017-03-13 v0.6.0.1 [Fix .travis.yml release-stack script](https://github.com/iconnect/regex/issues/67) - ☐ 2017-03-20 v1.0.0.0 [First stable release](https://github.com/iconnect/regex/milestone/3)+ ☒ 2017-03-15 v0.7.0.0 [Better organization of API](https://github.com/iconnect/regex/milestone/8)++ ☐ 2017-03-17 v0.8.0.0 [Add type-safe replacement templates and use TemplateHaskellQuotes](https://github.com/iconnect/regex/milestone/9)++ ☐ 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/PCRE.hs view
@@ -40,6 +40,7 @@ import Text.RE.PCRE.ByteString.Lazy() import Text.RE.PCRE.Sequence() import Text.RE.PCRE.String()+import Text.RE.Types.IsRegex -- | find all matches in text@@ -87,7 +88,7 @@ -- $re ----- "Text.RE.TDFA.RE" contains the toolkit specific to the 'RE' type,+-- "Text.RE.PCRE.RE" contains the toolkit specific to the 'RE' type, -- the type generated by the gegex compiler. -- $instances
Text/RE/PCRE/ByteString.hs view
@@ -31,6 +31,7 @@ import Data.Typeable import Text.Regex.Base import Text.RE+import Text.RE.Types.IsRegex import Text.RE.Internal.AddCaptureNames import Text.RE.PCRE.RE import qualified Text.Regex.PCRE as PCRE@@ -71,9 +72,11 @@ (=~~) bs rex = addCaptureNames (reCaptureNames rex) <$> matchM (reRegex rex) bs instance IsRegex RE B.ByteString where- matchOnce = flip (?=~)- matchMany = flip (*=~)- regexSource = reSource+ matchOnce = flip (?=~)+ matchMany = flip (*=~)+ makeRegexWith = \o -> compileRegexWith o . unpackE+ makeRegex = compileRegex . unpackE+ regexSource = packE . reSource -- $tutorial -- We have a regex tutorial at <http://tutorial.regex.uk>. These API
Text/RE/PCRE/ByteString/Lazy.hs view
@@ -31,6 +31,7 @@ import Data.Typeable import Text.Regex.Base import Text.RE+import Text.RE.Types.IsRegex import Text.RE.Internal.AddCaptureNames import Text.RE.PCRE.RE import qualified Text.Regex.PCRE as PCRE@@ -71,9 +72,11 @@ (=~~) bs rex = addCaptureNames (reCaptureNames rex) <$> matchM (reRegex rex) bs instance IsRegex RE LBS.ByteString where- matchOnce = flip (?=~)- matchMany = flip (*=~)- regexSource = reSource+ matchOnce = flip (?=~)+ matchMany = flip (*=~)+ makeRegexWith = \o -> compileRegexWith o . unpackE+ makeRegex = compileRegex . unpackE+ regexSource = packE . reSource -- $tutorial -- We have a regex tutorial at <http://tutorial.regex.uk>. These API
Text/RE/PCRE/RE.hs view
@@ -42,6 +42,8 @@ , defaultOptions , unpackSimpleRegexOptions , compileRegex+ , compileRegexWith+ , compileRegexWithOptions , escape , escapeREString ) where@@ -57,6 +59,8 @@ import Text.RE.Internal.PreludeMacros import Text.RE.Internal.QQ import Text.RE.TestBench+import Text.RE.Types.CaptureID+import Text.RE.Types.Options import Text.Regex.PCRE @@ -84,7 +88,7 @@ regexType :: RegexType regexType =- PCRE $ \txt env md -> txt =~ mdRegexSource regexType ExclCaptures env md+ mkPCRE $ \txt env md -> txt =~ mdRegexSource regexType ExclCaptures env md data RE = RE@@ -160,15 +164,24 @@ BlockSensitive -> (,) False False BlockInsensitive -> (,) False True -compileRegex :: ( IsOption o RE CompOption ExecOption- , Functor m- , Monad m- )- => o- -> String- -> m RE-compileRegex = compileRegex_ . makeOptions+-- | compie a RE from a string using default options+compileRegex :: (Functor m,Monad m) => String -> m RE+compileRegex = compileRegexWithOptions () +-- | compie a RE from a @String@ and 'SimpleRegexOptions'+compileRegexWith :: (Functor m,Monad m) => SimpleRegexOptions -> String -> m RE+compileRegexWith = compileRegexWithOptions++-- | compile a RE from a @String@ and a complete set of 'Options'+compileRegexWithOptions :: ( IsOption o RE CompOption ExecOption+ , Functor m+ , Monad m+ )+ => o+ -> String+ -> m RE+compileRegexWithOptions = compileRegex_ . makeOptions+ compileRegex_ :: ( Functor m , Monad m ) => Options -> String@@ -211,7 +224,7 @@ unsafeCompileRegex = unsafeCompileRegex_ . makeOptions unsafeCompileRegex_ :: Options -> String -> RE-unsafeCompileRegex_ os = either oops id . compileRegex os+unsafeCompileRegex_ os = either oops id . compileRegexWithOptions os where oops = error . ("unsafeCompileRegex: " ++)
Text/RE/PCRE/Sequence.hs view
@@ -31,6 +31,7 @@ import Data.Typeable import Text.Regex.Base import Text.RE+import Text.RE.Types.IsRegex import Text.RE.Internal.AddCaptureNames import Text.RE.PCRE.RE import qualified Text.Regex.PCRE as PCRE@@ -71,9 +72,11 @@ (=~~) bs rex = addCaptureNames (reCaptureNames rex) <$> matchM (reRegex rex) bs instance IsRegex RE (S.Seq Char) where- matchOnce = flip (?=~)- matchMany = flip (*=~)- regexSource = reSource+ matchOnce = flip (?=~)+ matchMany = flip (*=~)+ makeRegexWith = \o -> compileRegexWith o . unpackE+ makeRegex = compileRegex . unpackE+ regexSource = packE . reSource -- $tutorial -- We have a regex tutorial at <http://tutorial.regex.uk>. These API
Text/RE/PCRE/String.hs view
@@ -31,6 +31,7 @@ import Data.Typeable import Text.Regex.Base import Text.RE+import Text.RE.Types.IsRegex import Text.RE.Internal.AddCaptureNames import Text.RE.PCRE.RE import qualified Text.Regex.PCRE as PCRE@@ -71,9 +72,11 @@ (=~~) bs rex = addCaptureNames (reCaptureNames rex) <$> matchM (reRegex rex) bs instance IsRegex RE String where- matchOnce = flip (?=~)- matchMany = flip (*=~)- regexSource = reSource+ matchOnce = flip (?=~)+ matchMany = flip (*=~)+ makeRegexWith = \o -> compileRegexWith o . unpackE+ makeRegex = compileRegex . unpackE+ regexSource = packE . reSource -- $tutorial -- We have a regex tutorial at <http://tutorial.regex.uk>. These API
changelog view
@@ -1,5 +1,12 @@ -*-change-log-*- +0.7.0.0 Chris Dornan <chris.dornan@irisconnect.co.uk> 2017-03-15+ * Fix and extend Replace class (#74)+ * Better package organisation (#73)+ * Generalise sed' in progress (#72)+ * compileRegex to take just a string (#68)+ * Fix comment reference in Text.RE.PCRE in progress (#66)+ 0.6.0.1 Chris Dornan <chris.dornan@irisconnect.co.uk> 2017-03-13 * Fix .travis.yml release-stack script (#67)
regex-with-pcre.cabal view
@@ -1,5 +1,5 @@ Name: regex-with-pcre-Version: 0.6.0.1+Version: 0.7.0.0 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.6.0.1+ Tag: 0.7.0.0 @@ -52,7 +52,7 @@ -Wwarn Build-depends:- regex == 0.6.0.1+ regex == 0.7.0.0 , base >= 4 && < 5 , base-compat >= 0.6.0 , bytestring >= 0.10.2.0