regex 1.1.0.1 → 1.1.0.2
raw patch · 29 files changed
+70/−64 lines, 29 files
Files
- Text/RE.hs +1/−1
- Text/RE/REOptions.lhs +2/−2
- Text/RE/TDFA.hs +5/−5
- Text/RE/TDFA/ByteString.hs +5/−5
- Text/RE/TDFA/ByteString/Lazy.hs +5/−5
- Text/RE/TDFA/Sequence.hs +5/−5
- Text/RE/TDFA/String.hs +5/−5
- Text/RE/TDFA/Text.hs +5/−5
- Text/RE/TDFA/Text/Lazy.hs +5/−5
- Text/RE/Tools/Edit.lhs +2/−2
- Text/RE/Tools/Grep.lhs +2/−2
- Text/RE/Tools/Sed.lhs +1/−1
- Text/RE/ZeInternals/EscapeREString.hs +1/−1
- Text/RE/ZeInternals/NamedCaptures.lhs +1/−1
- Text/RE/ZeInternals/PreludeMacros.hs +1/−1
- Text/RE/ZeInternals/Replace.lhs +3/−3
- Text/RE/ZeInternals/SearchReplace/TDFA/ByteString.hs +1/−1
- Text/RE/ZeInternals/SearchReplace/TDFA/ByteString/Lazy.hs +1/−1
- Text/RE/ZeInternals/SearchReplace/TDFA/Sequence.hs +1/−1
- Text/RE/ZeInternals/SearchReplace/TDFA/String.hs +1/−1
- Text/RE/ZeInternals/SearchReplace/TDFA/Text.hs +1/−1
- Text/RE/ZeInternals/SearchReplace/TDFA/Text/Lazy.hs +1/−1
- Text/RE/ZeInternals/TDFA.hs +2/−2
- Text/RE/ZeInternals/TestBench.lhs +2/−2
- Text/RE/ZeInternals/Tools/Lex.lhs +1/−1
- Text/RE/ZeInternals/Types/IsRegex.lhs +1/−1
- Text/RE/ZeInternals/Types/Match.lhs +4/−1
- changelog +3/−0
- regex.cabal +2/−2
Text/RE.hs view
@@ -64,6 +64,6 @@ -- -- * "Text.RE.REOptions" for specifying back-end specific options; -- * "Text.RE.Replace" for the full text-replacement toolkit;--- * "Text.RE.TestBench" for building up, testing and doumenting;+-- * "Text.RE.TestBench" for building up, testing and documenting; -- macro environments for use in REs; -- * "Text.RE.Tools" for an AWK-like text-processing toolkit.
Text/RE/REOptions.lhs view
@@ -39,7 +39,7 @@ \begin{code} -- | the default API uses these simple, universal RE options,--- which get auto-converted into the apropriate back-end 'REOptions_'+-- which get auto-converted into the appropriate back-end 'REOptions_' data SimpleREOptions = MultilineSensitive -- ^ case-sensitive with ^ and $ matching the start and end of a line | MultilineInsensitive -- ^ case-insensitive with ^ and $ matsh the start and end of a line@@ -60,7 +60,7 @@ -- and its @CompOption@ and @ExecOption@ types (the compile-time and -- execution time options, respectively); each back end will define an -- @REOptions@ type that fills out these three type parameters with the--- apropriate types (see, for example, "Text.RE.TDFA")+-- appropriate types (see, for example, "Text.RE.TDFA") data REOptions_ r c e = REOptions { optionsMacs :: !(Macros r) -- ^ the available TestBench RE macros
Text/RE/TDFA.hs view
@@ -193,7 +193,7 @@ -- This module provides access to the back end through polymorphic functions -- that operate over all of the String\/Text\/ByteString types supported by the -- back end. The module also provides all of the specialised back-end functionality--- that will not be needed by most regex clientts. If you don't need this generality+-- that will not be needed by most regex clients. If you don't need this generality -- then you might want to consider using one of the simpler modules that have been -- specialised for each of these types: --@@ -222,7 +222,7 @@ -- options dynamically, use the @[re_| ... |]@ and @[ed_| ... \/\/\/ ... |]@ -- quasi quoters, which generate functions that take an 'IsOption' option -- (e.g., a 'SimpleReOptions' value) and yields a 'RE' or 'SearchReplace'--- as apropriate. For example if you have a 'SimpleReOptions' value in+-- as appropriate. For example if you have a 'SimpleReOptions' value in -- @sro@ then -- -- @(?=~/ [ed_|foo$\/\/\/bar|] sro)@@@ -231,7 +231,7 @@ -- on specifying RE options see "Text.RE.REOptions". -- $re--- The @[re|.*|]@ quasi quoters, with variants for specifing different+-- The @[re|.*|]@ quasi quoters, with variants for specifying different -- options to the RE compiler (see "Text.RE.REOptions"), and the -- specialised back-end types and functions. @@ -243,11 +243,11 @@ -- represents a @SearchReplace@ that will convert a YYYY-MM-DD format date -- into a DD\/MM\/YYYY format date. ----- The only difference betweem these quasi quoters is the RE options that are set,+-- The only difference between these quasi quoters is the RE options that are set, -- using the same conventions as the @[re| ... |]@ quasi quoters. -- $isregex--- The 'IsRegex' class is used to abstact over the different regex back ends and+-- The 'IsRegex' class is used to abstract over the different regex back ends and -- the text types they work with -- see "Text.RE.Tools.IsRegex" for details. -- $instances
Text/RE/TDFA/ByteString.hs view
@@ -186,7 +186,7 @@ -- options dynamically, use the @[re_| ... |]@ and @[ed_| ... \/\/\/ ... |]@ -- quasi quoters, which generate functions that take an 'IsOption' option -- (e.g., a 'SimpleReOptions' value) and yields a 'RE' or 'SearchReplace'--- as apropriate. For example if you have a 'SimpleReOptions' value in+-- as appropriate. For example if you have a 'SimpleReOptions' value in -- @sro@ then -- -- @(?=~/ [ed_|foo$\/\/\/bar|] sro)@@@ -195,12 +195,12 @@ -- on specifying RE options see "Text.RE.REOptions". -- $re--- The @[re|.*|]@ quasi quoters, with variants for specifing different+-- The @[re|.*|]@ quasi quoters, with variants for specifying different -- options to the RE compiler (see "Text.RE.REOptions"), and the -- specialised back-end types and functions. -- $ed--- The @[ed|.*\/\/\/foo|]@ quasi quoters, with variants for specifing different+-- The @[ed|.*\/\/\/foo|]@ quasi quoters, with variants for specifying different -- options to the RE compiler (see "Text.RE.REOptions"). -- $ed@@ -211,9 +211,9 @@ -- represents a @SearchReplace@ that will convert a YYYY-MM-DD format date -- into a DD\/MM\/YYYY format date. ----- The only difference betweem these quasi quoters is the RE options that are set,+-- The only difference between these quasi quoters is the RE options that are set, -- using the same conventions as the @[re| ... |]@ quasi quoters. -- $isregex--- The 'IsRegex' class is used to abstact over the different regex back ends and+-- The 'IsRegex' class is used to abstract over the different regex back ends and -- the text types they work with -- see "Text.RE.Tools.IsRegex" for details.
Text/RE/TDFA/ByteString/Lazy.hs view
@@ -186,7 +186,7 @@ -- options dynamically, use the @[re_| ... |]@ and @[ed_| ... \/\/\/ ... |]@ -- quasi quoters, which generate functions that take an 'IsOption' option -- (e.g., a 'SimpleReOptions' value) and yields a 'RE' or 'SearchReplace'--- as apropriate. For example if you have a 'SimpleReOptions' value in+-- as appropriate. For example if you have a 'SimpleReOptions' value in -- @sro@ then -- -- @(?=~/ [ed_|foo$\/\/\/bar|] sro)@@@ -195,12 +195,12 @@ -- on specifying RE options see "Text.RE.REOptions". -- $re--- The @[re|.*|]@ quasi quoters, with variants for specifing different+-- The @[re|.*|]@ quasi quoters, with variants for specifying different -- options to the RE compiler (see "Text.RE.REOptions"), and the -- specialised back-end types and functions. -- $ed--- The @[ed|.*\/\/\/foo|]@ quasi quoters, with variants for specifing different+-- The @[ed|.*\/\/\/foo|]@ quasi quoters, with variants for specifying different -- options to the RE compiler (see "Text.RE.REOptions"). -- $ed@@ -211,9 +211,9 @@ -- represents a @SearchReplace@ that will convert a YYYY-MM-DD format date -- into a DD\/MM\/YYYY format date. ----- The only difference betweem these quasi quoters is the RE options that are set,+-- The only difference between these quasi quoters is the RE options that are set, -- using the same conventions as the @[re| ... |]@ quasi quoters. -- $isregex--- The 'IsRegex' class is used to abstact over the different regex back ends and+-- The 'IsRegex' class is used to abstract over the different regex back ends and -- the text types they work with -- see "Text.RE.Tools.IsRegex" for details.
Text/RE/TDFA/Sequence.hs view
@@ -186,7 +186,7 @@ -- options dynamically, use the @[re_| ... |]@ and @[ed_| ... \/\/\/ ... |]@ -- quasi quoters, which generate functions that take an 'IsOption' option -- (e.g., a 'SimpleReOptions' value) and yields a 'RE' or 'SearchReplace'--- as apropriate. For example if you have a 'SimpleReOptions' value in+-- as appropriate. For example if you have a 'SimpleReOptions' value in -- @sro@ then -- -- @(?=~/ [ed_|foo$\/\/\/bar|] sro)@@@ -195,12 +195,12 @@ -- on specifying RE options see "Text.RE.REOptions". -- $re--- The @[re|.*|]@ quasi quoters, with variants for specifing different+-- The @[re|.*|]@ quasi quoters, with variants for specifying different -- options to the RE compiler (see "Text.RE.REOptions"), and the -- specialised back-end types and functions. -- $ed--- The @[ed|.*\/\/\/foo|]@ quasi quoters, with variants for specifing different+-- The @[ed|.*\/\/\/foo|]@ quasi quoters, with variants for specifying different -- options to the RE compiler (see "Text.RE.REOptions"). -- $ed@@ -211,9 +211,9 @@ -- represents a @SearchReplace@ that will convert a YYYY-MM-DD format date -- into a DD\/MM\/YYYY format date. ----- The only difference betweem these quasi quoters is the RE options that are set,+-- The only difference between these quasi quoters is the RE options that are set, -- using the same conventions as the @[re| ... |]@ quasi quoters. -- $isregex--- The 'IsRegex' class is used to abstact over the different regex back ends and+-- The 'IsRegex' class is used to abstract over the different regex back ends and -- the text types they work with -- see "Text.RE.Tools.IsRegex" for details.
Text/RE/TDFA/String.hs view
@@ -186,7 +186,7 @@ -- options dynamically, use the @[re_| ... |]@ and @[ed_| ... \/\/\/ ... |]@ -- quasi quoters, which generate functions that take an 'IsOption' option -- (e.g., a 'SimpleReOptions' value) and yields a 'RE' or 'SearchReplace'--- as apropriate. For example if you have a 'SimpleReOptions' value in+-- as appropriate. For example if you have a 'SimpleReOptions' value in -- @sro@ then -- -- @(?=~/ [ed_|foo$\/\/\/bar|] sro)@@@ -195,12 +195,12 @@ -- on specifying RE options see "Text.RE.REOptions". -- $re--- The @[re|.*|]@ quasi quoters, with variants for specifing different+-- The @[re|.*|]@ quasi quoters, with variants for specifying different -- options to the RE compiler (see "Text.RE.REOptions"), and the -- specialised back-end types and functions. -- $ed--- The @[ed|.*\/\/\/foo|]@ quasi quoters, with variants for specifing different+-- The @[ed|.*\/\/\/foo|]@ quasi quoters, with variants for specifying different -- options to the RE compiler (see "Text.RE.REOptions"). -- $ed@@ -211,9 +211,9 @@ -- represents a @SearchReplace@ that will convert a YYYY-MM-DD format date -- into a DD\/MM\/YYYY format date. ----- The only difference betweem these quasi quoters is the RE options that are set,+-- The only difference between these quasi quoters is the RE options that are set, -- using the same conventions as the @[re| ... |]@ quasi quoters. -- $isregex--- The 'IsRegex' class is used to abstact over the different regex back ends and+-- The 'IsRegex' class is used to abstract over the different regex back ends and -- the text types they work with -- see "Text.RE.Tools.IsRegex" for details.
Text/RE/TDFA/Text.hs view
@@ -186,7 +186,7 @@ -- options dynamically, use the @[re_| ... |]@ and @[ed_| ... \/\/\/ ... |]@ -- quasi quoters, which generate functions that take an 'IsOption' option -- (e.g., a 'SimpleReOptions' value) and yields a 'RE' or 'SearchReplace'--- as apropriate. For example if you have a 'SimpleReOptions' value in+-- as appropriate. For example if you have a 'SimpleReOptions' value in -- @sro@ then -- -- @(?=~/ [ed_|foo$\/\/\/bar|] sro)@@@ -195,12 +195,12 @@ -- on specifying RE options see "Text.RE.REOptions". -- $re--- The @[re|.*|]@ quasi quoters, with variants for specifing different+-- The @[re|.*|]@ quasi quoters, with variants for specifying different -- options to the RE compiler (see "Text.RE.REOptions"), and the -- specialised back-end types and functions. -- $ed--- The @[ed|.*\/\/\/foo|]@ quasi quoters, with variants for specifing different+-- The @[ed|.*\/\/\/foo|]@ quasi quoters, with variants for specifying different -- options to the RE compiler (see "Text.RE.REOptions"). -- $ed@@ -211,9 +211,9 @@ -- represents a @SearchReplace@ that will convert a YYYY-MM-DD format date -- into a DD\/MM\/YYYY format date. ----- The only difference betweem these quasi quoters is the RE options that are set,+-- The only difference between these quasi quoters is the RE options that are set, -- using the same conventions as the @[re| ... |]@ quasi quoters. -- $isregex--- The 'IsRegex' class is used to abstact over the different regex back ends and+-- The 'IsRegex' class is used to abstract over the different regex back ends and -- the text types they work with -- see "Text.RE.Tools.IsRegex" for details.
Text/RE/TDFA/Text/Lazy.hs view
@@ -186,7 +186,7 @@ -- options dynamically, use the @[re_| ... |]@ and @[ed_| ... \/\/\/ ... |]@ -- quasi quoters, which generate functions that take an 'IsOption' option -- (e.g., a 'SimpleReOptions' value) and yields a 'RE' or 'SearchReplace'--- as apropriate. For example if you have a 'SimpleReOptions' value in+-- as appropriate. For example if you have a 'SimpleReOptions' value in -- @sro@ then -- -- @(?=~/ [ed_|foo$\/\/\/bar|] sro)@@@ -195,12 +195,12 @@ -- on specifying RE options see "Text.RE.REOptions". -- $re--- The @[re|.*|]@ quasi quoters, with variants for specifing different+-- The @[re|.*|]@ quasi quoters, with variants for specifying different -- options to the RE compiler (see "Text.RE.REOptions"), and the -- specialised back-end types and functions. -- $ed--- The @[ed|.*\/\/\/foo|]@ quasi quoters, with variants for specifing different+-- The @[ed|.*\/\/\/foo|]@ quasi quoters, with variants for specifying different -- options to the RE compiler (see "Text.RE.REOptions"). -- $ed@@ -211,9 +211,9 @@ -- represents a @SearchReplace@ that will convert a YYYY-MM-DD format date -- into a DD\/MM\/YYYY format date. ----- The only difference betweem these quasi quoters is the RE options that are set,+-- The only difference between these quasi quoters is the RE options that are set, -- using the same conventions as the @[re| ... |]@ quasi quoters. -- $isregex--- The 'IsRegex' class is used to abstact over the different regex back ends and+-- The 'IsRegex' class is used to abstract over the different regex back ends and -- the text types they work with -- see "Text.RE.Tools.IsRegex" for details.
Text/RE/Tools/Edit.lhs view
@@ -50,13 +50,13 @@ -- | each Edit action specifies how the match should be processed data Edit m re s = Template !(SearchReplace re s)- -- ^ replace the match with this template text, substituting ${capture} as apropriate+ -- ^ replace the match with this template text, substituting ${capture} as appropriate | Function !re REContext !(LineNo->Match s->RELocation->Capture s->m (Maybe s)) -- ^ use this function to replace the 'REContext' specified captures in each line matched | LineEdit !re !(LineNo->Matches s->m (LineEdit s)) -- ^ use this function to edit each line matched --- | a LineEdit is the most general action thar can be performed on a line+-- | a LineEdit is the most general action that can be performed on a line -- and is the only means of deleting a line data LineEdit s = NoEdit -- ^ do not edit this line but leave as is
Text/RE/Tools/Grep.lhs view
@@ -47,7 +47,7 @@ \end{code} \begin{code}--- | specifies whether to return the linss matched or missed+-- | specifies whether to return the lines matched or missed data Verbosity = LinesMatched | LinesNotMatched@@ -121,7 +121,7 @@ \begin{code} -- $tutorial--- The Grep toolkit matches REs againt each line of a text.+-- The Grep toolkit matches REs against each line of a text. -- -- See the Regex Tools tutorial at http://re-tutorial-tools.regex.uk \end{code}
Text/RE/Tools/Sed.lhs view
@@ -87,7 +87,7 @@ \begin{code} -- $tutorial--- The Sed toolkit applyies @Edits@ scripts to each line+-- The Sed toolkit applies @Edits@ scripts to each line -- of a text, running the actions and adjusting each line -- accordingly. --
Text/RE/ZeInternals/EscapeREString.hs view
@@ -8,7 +8,7 @@ esc c t | isMetaChar c = '\\' : c : t | otherwise = c : t --- | returns True iff the charactr is an RE meta character+-- | returns True iff the character is an RE meta character -- ('[', '*', '{', etc.) isMetaChar :: Char -> Bool isMetaChar c = case c of
Text/RE/ZeInternals/NamedCaptures.lhs view
@@ -47,7 +47,7 @@ } -- | extract the CaptureNames from an RE or return an error diagnostic--- if the RE is not well formed; also returs the total number of captures+-- if the RE is not well formed; also returns the total number of captures -- in the RE extractNamedCaptures :: String -> Either String ((Int,CaptureNames),String) extractNamedCaptures s = Right (analyseTokens tks,formatTokens tks)
Text/RE/ZeInternals/PreludeMacros.hs view
@@ -58,7 +58,7 @@ preludeMacroSources rty = formatMacroSources rty ExclCaptures $ preludeMacroEnv rty --- | generate plain text giving theexpanded RE for a single macro+-- | generate plain text giving the expanded RE for a single macro preludeMacroSource :: RegexType -> PreludeMacro -> String preludeMacroSource rty = formatMacroSource rty ExclCaptures (preludeMacroEnv rty) . prelude_macro_id
Text/RE/ZeInternals/Replace.lhs view
@@ -289,7 +289,7 @@ \end{code} \begin{code}--- | expand the @{..} macos in the argument string using the given+-- | expand the @{..} macros in the argument string using the given -- function expandMacros' :: (MacroID->Maybe String) -> String -> String expandMacros' lu = fixpoint e_m@@ -404,7 +404,7 @@ \end{code} \begin{code}--- | a selction of the Replace methods can be encapsulated with ReplaceMethods+-- | a selection of the Replace methods can be encapsulated with ReplaceMethods -- for the higher-order replacement functions data ReplaceMethods a = ReplaceMethods@@ -495,7 +495,7 @@ ------------------------- \begin{code}--- | parse the replacement template in second argument, substititing+-- | parse the replacement template in second argument, substituting -- the capture references with corresponding captures from the Match -- in the third argument (the result of a single match of the RE -- against the input text to be matched); Nothing is returned if the
Text/RE/ZeInternals/SearchReplace/TDFA/ByteString.hs view
@@ -71,7 +71,7 @@ -- @s *=~/ [ed_|${hex}([0-9a-f]+)\/\/\/0x${hex}|] MultilineInsensitive@ -- -- prefixes the hexadecimal digit strings in s with @0x@, allowing for--- upper- or lower-case hex didgits (which is entirely equivalent+-- upper- or lower-case hex digits (which is entirely equivalent -- in this example to just using @[edMultilineInsensitive|[0-9a-f]+|]@). ed_ :: QuasiQuoter ed_ = ed' fn_cast Nothing
Text/RE/ZeInternals/SearchReplace/TDFA/ByteString/Lazy.hs view
@@ -71,7 +71,7 @@ -- @s *=~/ [ed_|${hex}([0-9a-f]+)\/\/\/0x${hex}|] MultilineInsensitive@ -- -- prefixes the hexadecimal digit strings in s with @0x@, allowing for--- upper- or lower-case hex didgits (which is entirely equivalent+-- upper- or lower-case hex digits (which is entirely equivalent -- in this example to just using @[edMultilineInsensitive|[0-9a-f]+|]@). ed_ :: QuasiQuoter ed_ = ed' fn_cast Nothing
Text/RE/ZeInternals/SearchReplace/TDFA/Sequence.hs view
@@ -71,7 +71,7 @@ -- @s *=~/ [ed_|${hex}([0-9a-f]+)\/\/\/0x${hex}|] MultilineInsensitive@ -- -- prefixes the hexadecimal digit strings in s with @0x@, allowing for--- upper- or lower-case hex didgits (which is entirely equivalent+-- upper- or lower-case hex digits (which is entirely equivalent -- in this example to just using @[edMultilineInsensitive|[0-9a-f]+|]@). ed_ :: QuasiQuoter ed_ = ed' fn_cast Nothing
Text/RE/ZeInternals/SearchReplace/TDFA/String.hs view
@@ -71,7 +71,7 @@ -- @s *=~/ [ed_|${hex}([0-9a-f]+)\/\/\/0x${hex}|] MultilineInsensitive@ -- -- prefixes the hexadecimal digit strings in s with @0x@, allowing for--- upper- or lower-case hex didgits (which is entirely equivalent+-- upper- or lower-case hex digits (which is entirely equivalent -- in this example to just using @[edMultilineInsensitive|[0-9a-f]+|]@). ed_ :: QuasiQuoter ed_ = ed' fn_cast Nothing
Text/RE/ZeInternals/SearchReplace/TDFA/Text.hs view
@@ -71,7 +71,7 @@ -- @s *=~/ [ed_|${hex}([0-9a-f]+)\/\/\/0x${hex}|] MultilineInsensitive@ -- -- prefixes the hexadecimal digit strings in s with @0x@, allowing for--- upper- or lower-case hex didgits (which is entirely equivalent+-- upper- or lower-case hex digits (which is entirely equivalent -- in this example to just using @[edMultilineInsensitive|[0-9a-f]+|]@). ed_ :: QuasiQuoter ed_ = ed' fn_cast Nothing
Text/RE/ZeInternals/SearchReplace/TDFA/Text/Lazy.hs view
@@ -71,7 +71,7 @@ -- @s *=~/ [ed_|${hex}([0-9a-f]+)\/\/\/0x${hex}|] MultilineInsensitive@ -- -- prefixes the hexadecimal digit strings in s with @0x@, allowing for--- upper- or lower-case hex didgits (which is entirely equivalent+-- upper- or lower-case hex digits (which is entirely equivalent -- in this example to just using @[edMultilineInsensitive|[0-9a-f]+|]@). ed_ :: QuasiQuoter ed_ = ed' fn_cast Nothing
Text/RE/ZeInternals/TDFA.hs view
@@ -310,7 +310,7 @@ preludeSources :: String preludeSources = preludeMacroSources regexType --- | the prolude source of a given macro in the standard environment+-- | the prelude source of a given macro in the standard environment preludeSource :: PreludeMacro -> String preludeSource = preludeMacroSource regexType @@ -363,7 +363,7 @@ -- @countMatches $ s *=~ [re_|[0-9a-f]+|] MultilineInsensitive@ -- -- counts the number of hexadecimal digit strings in 's', allowing--- for upper- or lower-case hex didgits (which is entirely equivalent+-- for upper- or lower-case hex digits (which is entirely equivalent -- in this example to just using @[reMultilineInsensitive|[0-9a-f]+|]@). re_ :: QuasiQuoter re_ = re' Nothing
Text/RE/ZeInternals/TestBench.lhs view
@@ -84,7 +84,7 @@ show (TDFA _) = "TDFA <function>" show (PCRE _) = "PCRE <function>" --- | do we need the captures in the RE or whould they be stripped out+-- | do we need the captures in the RE or would they be stripped out -- where possible data WithCaptures = InclCaptures -- ^ include all captures@@ -95,7 +95,7 @@ -- required for each macro, so we use a Lazy HashMap type MacroEnv = HML.HashMap MacroID MacroDescriptor --- | describes a macro, giving the text of the RE and a si=ummary+-- | describes a macro, giving the text of the RE and a summary -- description data MacroDescriptor = MacroDescriptor
Text/RE/ZeInternals/Tools/Lex.lhs view
@@ -13,7 +13,7 @@ \begin{code}--- | a simple regex-based scanner interpretter for prototyping+-- | a simple regex-based scanner interpreter for prototyping -- scanners alex :: IsRegex re s => [(re,Match s->Maybe t)] -> t -> s -> [t] alex = alex' matchOnce
Text/RE/ZeInternals/Types/IsRegex.lhs view
@@ -36,7 +36,7 @@ makeRegexWith :: (Functor m,Monad m, MonadFail m) => SimpleREOptions -> s -> m re -- | compiling a 'SearchReplace' template from the RE text and the template Text, failing if they are not well formed makeSearchReplace :: (Functor m,Monad m, MonadFail m,IsRegex re s) => s -> s -> m (SearchReplace re s)- -- | compiling a 'SearchReplace' template specifing the 'SimpleREOptions' for the RE+ -- | compiling a 'SearchReplace' template specifying the 'SimpleREOptions' for the RE makeSearchReplaceWith :: (Functor m,Monad m, MonadFail m,IsRegex re s) => SimpleREOptions -> s -> s -> m (SearchReplace re s) -- | incorporate an escaped string into a compiled RE with the default options makeEscaped :: (Functor m,Monad m, MonadFail m) => (s->s) -> s -> m re
Text/RE/ZeInternals/Types/Match.lhs view
@@ -246,7 +246,10 @@ False -> skip 0 0 -- BW.index calls below should not fail where skip ix di = case compare ix ix0 of- GT -> error "utf8_correct_bs: UTF-8 decoding error"+ GT -> case ix0 of+ -- -1 is used as a magic number to indicate failure to match+ -1 -> CharRange ix0 ln0+ _ -> error "utf8_correct_bs: UTF-8 decoding error" EQ -> count ix di 0 ln0 LT -> case u8_width $ BW.index bs ix of Single -> skip (ix+1) di
changelog view
@@ -1,5 +1,8 @@ -*-change-log-*- +1.1.0.2 Igor Ranieri Elland 2022-05-20+* fix for [#171](https://github.com/iconnect/regex/issues/171)+ 1.1.0.1 Chris Dornan <chris.dornan@irisconnect.co.uk> 2018-12-19 * fix for base-4.16.0.0/GHC 9.2.1 * eliminate http-conduit dependency (currently stymied by cryptonite)
regex.cabal view
@@ -1,5 +1,5 @@ Name: regex-Version: 1.1.0.1+Version: 1.1.0.2 Synopsis: Toolkit for regex-base Description: A regular expression toolkit for regex-base with compile-time checking of RE syntax, data types for@@ -32,7 +32,7 @@ Source-Repository this Type: git Location: https://github.com/iconnect/regex.git- Tag: 1.1.0.1+ Tag: 1.1.0.2