-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Toolkit for regex-base
--
-- A Regular Expression Toolkit for regex-base with Compile-time checking
-- of RE syntax, data types for matches and captures, a text replacement
-- toolkit, portable options, high-level AWK-like tools for building text
-- processing apps, regular expression macros and test bench, a tutorial
-- and copious examples.
@package regex
@version 0.2.0.2
module Text.RE.Options
data Options_ r c e
Options :: !Mode -> !(Macros r) -> !c -> !e -> Options_ r c e
[_options_mode] :: Options_ r c e -> !Mode
[_options_macs] :: Options_ r c e -> !(Macros r)
[_options_comp] :: Options_ r c e -> !c
[_options_exec] :: Options_ r c e -> !e
class IsOption o r c e | e -> r, c -> e, e -> c, r -> c, c -> r, r -> e
makeOptions :: IsOption o r c e => o -> Options_ r c e
data Mode
Simple :: Mode
Block :: Mode
newtype MacroID
MacroID :: String -> MacroID
[_MacroID] :: MacroID -> String
type Macros r = HashMap MacroID r
emptyMacros :: Macros r
data SimpleRegexOptions
MultilineSensitive :: SimpleRegexOptions
MultilineInsensitive :: SimpleRegexOptions
BlockSensitive :: SimpleRegexOptions
BlockInsensitive :: SimpleRegexOptions
instance GHC.Show.Show Text.RE.Options.SimpleRegexOptions
instance GHC.Classes.Ord Text.RE.Options.SimpleRegexOptions
instance GHC.Classes.Eq Text.RE.Options.SimpleRegexOptions
instance GHC.Enum.Enum Text.RE.Options.SimpleRegexOptions
instance GHC.Enum.Bounded Text.RE.Options.SimpleRegexOptions
instance (GHC.Show.Show e, GHC.Show.Show c, GHC.Show.Show r) => GHC.Show.Show (Text.RE.Options.Options_ r c e)
instance GHC.Show.Show Text.RE.Options.MacroID
instance GHC.Classes.Eq Text.RE.Options.MacroID
instance GHC.Classes.Ord Text.RE.Options.MacroID
instance Data.String.IsString Text.RE.Options.MacroID
instance GHC.Show.Show Text.RE.Options.Mode
instance GHC.Classes.Eq Text.RE.Options.Mode
instance GHC.Classes.Ord Text.RE.Options.Mode
instance GHC.Enum.Enum Text.RE.Options.Mode
instance GHC.Enum.Bounded Text.RE.Options.Mode
instance Data.Hashable.Class.Hashable Text.RE.Options.MacroID
instance Language.Haskell.TH.Syntax.Lift Text.RE.Options.SimpleRegexOptions
module Text.RE.LineNo
newtype LineNo
ZeroBasedLineNo :: Int -> LineNo
[getZeroBasedLineNo] :: LineNo -> Int
firstLine :: LineNo
getLineNo :: LineNo -> Int
lineNo :: Int -> LineNo
instance GHC.Enum.Enum Text.RE.LineNo.LineNo
instance GHC.Show.Show Text.RE.LineNo.LineNo
module Text.RE.Internal.QQ
data QQFailure
QQFailure :: String -> String -> QQFailure
[_qqf_context] :: QQFailure -> String
[_qqf_component] :: QQFailure -> String
qq0 :: String -> QuasiQuoter
instance GHC.Show.Show Text.RE.Internal.QQ.QQFailure
instance GHC.Exception.Exception Text.RE.Internal.QQ.QQFailure
module Text.RE.CaptureID
data CaptureID
CID_ordinal :: CaptureOrdinal -> CaptureID
CID_name :: CaptureName -> CaptureID
type CaptureNames = HashMap CaptureName CaptureOrdinal
noCaptureNames :: CaptureNames
newtype CaptureName
CaptureName :: Text -> CaptureName
[getCaptureName] :: CaptureName -> Text
newtype CaptureOrdinal
CaptureOrdinal :: Int -> CaptureOrdinal
[getCaptureOrdinal] :: CaptureOrdinal -> Int
findCaptureID :: CaptureID -> CaptureNames -> Int
instance GHC.Classes.Eq Text.RE.CaptureID.CaptureID
instance GHC.Classes.Ord Text.RE.CaptureID.CaptureID
instance GHC.Show.Show Text.RE.CaptureID.CaptureID
instance GHC.Num.Num Text.RE.CaptureID.CaptureOrdinal
instance GHC.Arr.Ix Text.RE.CaptureID.CaptureOrdinal
instance GHC.Enum.Enum Text.RE.CaptureID.CaptureOrdinal
instance GHC.Classes.Eq Text.RE.CaptureID.CaptureOrdinal
instance GHC.Classes.Ord Text.RE.CaptureID.CaptureOrdinal
instance GHC.Show.Show Text.RE.CaptureID.CaptureOrdinal
instance GHC.Classes.Eq Text.RE.CaptureID.CaptureName
instance GHC.Classes.Ord Text.RE.CaptureID.CaptureName
instance GHC.Show.Show Text.RE.CaptureID.CaptureName
instance Data.Hashable.Class.Hashable Text.RE.CaptureID.CaptureName
module Text.RE.Capture
-- | the result type to use when every match is needed, not just the first
-- match of the RE against the source
data Matches a
Matches :: !a -> ![Match a] -> Matches a
-- | the source text being matched
[matchesSource] :: Matches a -> !a
-- | all captures found, left to right
[allMatches] :: Matches a -> ![Match a]
-- | the result of matching a RE to a text once, listing the text that was
-- matched and the named captures in the RE and all of the substrings
-- matched, with the text captured by the whole RE; a complete failure to
-- match will be represented with an empty array (with bounds (0,-1))
data Match a
Match :: !a -> !CaptureNames -> !(Array CaptureOrdinal (Capture a)) -> Match a
-- | the whole source text
[matchSource] :: Match a -> !a
-- | the RE's capture names
[captureNames] :: Match a -> !CaptureNames
-- |
-- - .n-1 captures, starting with the text matched by the whole RE
--
[matchArray] :: Match a -> !(Array CaptureOrdinal (Capture a))
-- | the matching of a single sub-expression against part of the source
-- text
data Capture a
Capture :: !a -> !a -> !Int -> !Int -> Capture a
-- | the whole text that was searched
[captureSource] :: Capture a -> !a
-- | the text that was matched
[capturedText] :: Capture a -> !a
-- | the number of characters preceding the match with -1 used if no text
-- was captured by the RE (not even the empty string)
[captureOffset] :: Capture a -> !Int
-- | the number of chacter in the captured sub-string
[captureLength] :: Capture a -> !Int
-- | Construct a Match that does not match anything.
noMatch :: a -> Match a
-- | an empty array of Capture
emptyMatchArray :: Array CaptureOrdinal (Capture a)
-- | tests whether the RE matched the source text at all
anyMatches :: Matches a -> Bool
-- | count the matches
countMatches :: Matches a -> Int
matches :: Matches a -> [a]
-- | extract the main capture from each match
mainCaptures :: Matches a -> [Capture a]
-- | tests whether the RE matched the source text at all
matched :: Match a -> Bool
-- | tests whether the RE matched the source text at all
matchedText :: Match a -> Maybe a
-- | the top-level capture if the source text matched the RE, Nothing
-- otherwise
matchCapture :: Match a -> Maybe (Capture a)
-- | the top-level capture and the sub captures if the text matched the RE,
-- Nothing otherwise
matchCaptures :: Match a -> Maybe (Capture a, [Capture a])
-- | an alternative for captureText
(!$$) :: Match a -> CaptureID -> a
infixl 9 !$$
-- | look up the text of the nth capture, 0 being the match of the whole RE
-- against the source text, 1, the first bracketed sub-expression to be
-- matched and so on
captureText :: CaptureID -> Match a -> a
-- | an alternative for captureTextMaybe
(!$$?) :: Match a -> CaptureID -> Maybe a
-- | look up the text of the nth capture (0 being the match of the whole),
-- returning Nothing if the Match doesn't contain the capture
captureTextMaybe :: CaptureID -> Match a -> Maybe a
-- | an alternative for capture
(!$) :: Match a -> CaptureID -> Capture a
infixl 9 !$
-- | look up the nth capture, 0 being the match of the whole RE against the
-- source text, 1, the first bracketed sub-expression to be matched and
-- so on
capture :: CaptureID -> Match a -> Capture a
-- | an alternative for capture captureMaybe
(!$?) :: Match a -> CaptureID -> Maybe (Capture a)
-- | look up the nth capture, 0 being the match of the whole RE against the
-- source text, 1, the first bracketed sub-expression to be matched and
-- so on, returning Nothing if there is no such capture, or if the
-- capture failed to capture anything (being in a failed alternate)
captureMaybe :: CaptureID -> Match a -> Maybe (Capture a)
-- | test if the capture has matched any text
hasCaptured :: Capture a -> Bool
-- | returns the text preceding the match
capturePrefix :: Extract a => Capture a -> a
-- | returns the text after the match
captureSuffix :: Extract a => Capture a -> a
instance GHC.Classes.Eq a => GHC.Classes.Eq (Text.RE.Capture.Matches a)
instance GHC.Show.Show a => GHC.Show.Show (Text.RE.Capture.Matches a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Text.RE.Capture.Match a)
instance GHC.Show.Show a => GHC.Show.Show (Text.RE.Capture.Match a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Text.RE.Capture.Capture a)
instance GHC.Show.Show a => GHC.Show.Show (Text.RE.Capture.Capture a)
instance GHC.Base.Functor Text.RE.Capture.Matches
instance GHC.Base.Functor Text.RE.Capture.Match
instance GHC.Base.Functor Text.RE.Capture.Capture
instance (Text.Regex.Base.RegexLike.RegexContext regex source (Text.Regex.Base.RegexLike.AllTextSubmatches (GHC.Arr.Array GHC.Types.Int) (source, (GHC.Types.Int, GHC.Types.Int))), Text.Regex.Base.RegexLike.RegexLike regex source) => Text.Regex.Base.RegexLike.RegexContext regex source (Text.RE.Capture.Match source)
instance (Text.Regex.Base.RegexLike.RegexContext regex source [Text.Regex.Base.RegexLike.MatchText source], Text.Regex.Base.RegexLike.RegexLike regex source) => Text.Regex.Base.RegexLike.RegexContext regex source (Text.RE.Capture.Matches source)
module Text.RE.Replace
-- | Replace provides the missing methods needed to replace the matched
-- text; length_ is the minimum implementation
class (Extract a, Monoid a) => Replace a where textify = pack . unpack_ detextify = pack_ . unpack appendNewline = (<> pack_ "\n") subst f m@(Capture {..}) = capturePrefix m <> f capturedText <> captureSuffix m
-- | length function for a
length_ :: Replace a => a -> Int
-- | inject String into a
pack_ :: Replace a => String -> a
-- | project a onto a String
unpack_ :: Replace a => a -> String
-- | inject into Text
textify :: Replace a => a -> Text
-- | project Text onto a
detextify :: Replace a => Text -> a
-- | append a newline
appendNewline :: Replace a => a -> a
-- | apply a substitution function to a Capture
subst :: Replace a => (a -> a) -> Capture a -> a
-- | convert a template containing $0, $1, etc., in the first argument,
-- into a phi replacement function for use with
-- replaceAllCaptures' and replaceCaptures'
parse_tpl :: Replace a => a -> Match a -> Location -> Capture a -> Maybe a
-- | a selction of the Replace methods can be encapsulated with Replace_
-- for the higher-order replacement functions
data Replace_ a
Replace_ :: (a -> Int) -> ((a -> a) -> Capture a -> a) -> Replace_ a
[_r_length] :: Replace_ a -> a -> Int
[_r_subst] :: Replace_ a -> (a -> a) -> Capture a -> a
-- | replace_ encapsulates Replace_ a from a Replace a context
replace_ :: Replace a => Replace_ a
-- | Phi specifies the substitution function for procesing the
-- substrings captured by the regular expression.
data Phi a
Phi :: Context -> (Location -> a -> a) -> Phi a
-- | the context for applying the substitution
[_phi_context] :: Phi a -> Context
-- | the substitution function takes the location and the text to be
-- replaced and returns the replacement text to be substituted
[_phi_phi] :: Phi a -> Location -> a -> a
-- | Context specifies which contexts the substitutions should be
-- applied
data Context
-- | substitutions should be applied to the top-level only, the text that
-- matched the whole RE
TOP :: Context
-- | substitutions should only be applied to the text captured by bracketed
-- sub-REs
SUB :: Context
-- | the substitution function should be applied to all captures, the top
-- level and the sub-expression captures
ALL :: Context
-- | the Location information passed into the substitution
-- function specifies which sub-expression is being substituted
data Location
Location :: Int -> CaptureOrdinal -> Location
-- | the zero-based, i-th string to be matched, when matching all strings,
-- zero when only the first string is being matched
[_loc_match] :: Location -> Int
-- | 0, when matching the top-level string matched by the whole RE, 1 for
-- the top-most, left-most redex captured by bracketed sub-REs, etc.
[_loc_capture] :: Location -> CaptureOrdinal
-- | True iff the location references a complete match (i.e., not a
-- bracketed capture)
isTopLocation :: Location -> Bool
replace :: Replace a => Match a -> a -> a
-- | replace all with a template, $0 for whole text, $1 for first capture,
-- etc.
replaceAll :: Replace a => a -> Matches a -> a
-- | substitutes the PHI substitutions through the Matches
replaceAllCaptures :: Replace a => Phi a -> Matches a -> a
-- | substitutes using a function that takes the full Match context and
-- returns the same replacement text as the _phi_phi context.
replaceAllCaptures' :: Replace a => Context -> (Match a -> Location -> Capture a -> Maybe a) -> Matches a -> a
-- | replaceAllCaptures_ is like like replaceAllCaptures' but takes the
-- Replace methods through the Replace_ argument
replaceAllCaptures_ :: Extract a => Replace_ a -> Context -> (Match a -> Location -> Capture a -> Maybe a) -> Matches a -> a
-- | replaceAllCapturesM is just a monadically generalised version of
-- replaceAllCaptures_
replaceAllCapturesM :: (Extract a, Monad m) => Replace_ a -> Context -> (Match a -> Location -> Capture a -> m (Maybe a)) -> Matches a -> m a
-- | substitutes the PHI substitutions through the Match
replaceCaptures :: Replace a => Phi a -> Match a -> a
-- | substitutes using a function that takes the full Match context and
-- returns the same replacement text as the _phi_phi context.
replaceCaptures' :: Replace a => Context -> (Match a -> Location -> Capture a -> Maybe a) -> Match a -> a
-- | replaceCaptures_ is like replaceCaptures' but takes the Replace
-- methods through the Replace_ argument
replaceCaptures_ :: Extract a => Replace_ a -> Context -> (Match a -> Location -> Capture a -> Maybe a) -> Match a -> a
-- | replaceCapturesM is just a monadically generalised version of
-- replaceCaptures_
replaceCapturesM :: (Monad m, Extract a) => Replace_ a -> Context -> (Match a -> Location -> Capture a -> m (Maybe a)) -> Match a -> m a
-- | expand all of the @{..} macros in the RE in the argument String
-- according to the Macros argument, preprocessing the RE String
-- according to the Mode argument (used internally)
expandMacros :: (r -> String) -> Mode -> Macros r -> String -> String
-- | expand the @{..} macos in the argument string using the given function
expandMacros' :: (MacroID -> Maybe String) -> String -> String
instance GHC.Show.Show Text.RE.Replace.Location
instance GHC.Show.Show Text.RE.Replace.Context
instance Text.RE.Replace.Replace [GHC.Types.Char]
instance Text.RE.Replace.Replace Data.ByteString.Internal.ByteString
instance Text.RE.Replace.Replace Data.ByteString.Lazy.Internal.ByteString
instance Text.RE.Replace.Replace (Data.Sequence.Seq GHC.Types.Char)
instance Text.RE.Replace.Replace Data.Text.Internal.Text
instance Text.RE.Replace.Replace Data.Text.Internal.Lazy.Text
module Text.RE.IsRegex
class Replace s => IsRegex re s
matchOnce :: IsRegex re s => re -> s -> Match s
matchMany :: IsRegex re s => re -> s -> Matches s
regexSource :: IsRegex re s => re -> String
module Text.RE.Edit
data LineNo
data Edits m re s
Select :: [(re, Edit m s)] -> Edits m re s
Pipe :: [(re, Edit m s)] -> Edits m re s
data Edit m s
EDIT_tpl :: s -> Edit m s
EDIT_phi :: (Phi s) -> Edit m s
EDIT_fun :: Context -> (LineNo -> Match s -> Location -> Capture s -> m (Maybe s)) -> Edit m s
EDIT_gen :: (LineNo -> Matches s -> m (LineEdit s)) -> Edit m s
data LineEdit s
NoEdit :: LineEdit s
ReplaceWith :: s -> LineEdit s
Delete :: LineEdit s
applyEdits :: (IsRegex re s, Monad m, Functor m) => LineNo -> Edits m re s -> s -> m s
applyEdit :: (IsRegex re s, Monad m, Functor m) => (s -> s) -> LineNo -> re -> Edit m s -> s -> m (Maybe s)
applyLineEdit :: Monoid s => (s -> s) -> LineEdit s -> Maybe s
instance GHC.Show.Show s => GHC.Show.Show (Text.RE.Edit.LineEdit s)
module Text.RE.Tools.Sed
type SedScript re = Edits IO re ByteString
sed :: IsRegex re ByteString => SedScript re -> FilePath -> FilePath -> IO ()
sed' :: (IsRegex re ByteString, Monad m, Functor m) => Edits m re ByteString -> ByteString -> m ByteString
module Text.RE.Parsers
parseInteger :: Replace a => a -> Maybe Int
parseHex :: Replace a => a -> Maybe Int
parseDouble :: Replace a => a -> Maybe Double
parseString :: Replace a => a -> Maybe Text
parseSimpleString :: Replace a => a -> Maybe Text
parseDate :: Replace a => a -> Maybe Day
parseSlashesDate :: Replace a => a -> Maybe Day
parseTimeOfDay :: Replace a => a -> Maybe TimeOfDay
parseTimeZone :: Replace a => a -> Maybe TimeZone
parseDateTime :: Replace a => a -> Maybe UTCTime
parseDateTime8601 :: Replace a => a -> Maybe UTCTime
parseDateTimeCLF :: Replace a => a -> Maybe UTCTime
parseShortMonth :: Replace a => a -> Maybe Int
shortMonthArray :: Array Int Text
type IPV4Address = (Word8, Word8, Word8, Word8)
parseIPv4Address :: Replace a => a -> Maybe IPV4Address
data Severity
Emerg :: Severity
Alert :: Severity
Crit :: Severity
Err :: Severity
Warning :: Severity
Notice :: Severity
Info :: Severity
Debug :: Severity
parseSeverity :: Replace a => a -> Maybe Severity
severityKeywords :: Severity -> (Text, [Text])
instance GHC.Show.Show Text.RE.Parsers.Severity
instance GHC.Classes.Eq Text.RE.Parsers.Severity
instance GHC.Classes.Ord Text.RE.Parsers.Severity
instance GHC.Enum.Enum Text.RE.Parsers.Severity
instance GHC.Enum.Bounded Text.RE.Parsers.Severity
module Text.RE.TestBench
newtype MacroID
MacroID :: String -> MacroID
[_MacroID] :: MacroID -> String
-- | what kind of back end will be compiling the RE
data RegexType
TDFA :: RegexType
PCRE :: RegexType
-- | each macro can reference others, the whole environment being required
-- for each macro, so we use a Lazy HashMap
type MacroEnv = HashMap MacroID MacroDescriptor
-- | do we need the captures in the RE or whould they be stripped out where
-- possible
data WithCaptures
InclCaptures :: WithCaptures
ExclCaptures :: WithCaptures
-- | describes a macro, giving the text of the RE and a si=ummary
-- description
data MacroDescriptor
MacroDescriptor :: !RegexSource -> ![String] -> ![String] -> ![TestResult] -> !(Maybe FunctionID) -> !String -> MacroDescriptor
-- | the RE
[_md_source] :: MacroDescriptor -> !RegexSource
-- | some sample matches
[_md_samples] :: MacroDescriptor -> ![String]
-- | some sample non-matches
[_md_counter_samples] :: MacroDescriptor -> ![String]
-- | validation test results
[_md_test_results] :: MacroDescriptor -> ![TestResult]
-- | WA, the parser function
[_md_parser] :: MacroDescriptor -> !(Maybe FunctionID)
-- | summary comment
[_md_description] :: MacroDescriptor -> !String
-- | list of failures on a validation run
newtype TestResult
TestResult :: String -> TestResult
[_TestResult] :: TestResult -> String
-- | a RE that should work for POSIX and PCRE with open brackets ('(')
-- represented as follows: ( mere symbol (?: used for grouping only, not
-- for captures (}: used for captures only, not for grouping (]: used for
-- captures and grouping ( do not modify
newtype RegexSource
RegexSource :: String -> RegexSource
[_RegexSource] :: RegexSource -> String
-- | name of the Haskell parser function for parsing the text matched by a
-- macro
newtype FunctionID
FunctionID :: String -> FunctionID
[_FunctionID] :: FunctionID -> String
mkMacros :: (Monad m, Functor m) => (String -> m r) -> RegexType -> WithCaptures -> MacroEnv -> m (Macros r)
testMacroEnv :: String -> RegexType -> MacroEnv -> IO Bool
badMacros :: MacroEnv -> [MacroID]
runTests :: (Eq a, Show a) => RegexType -> (String -> Maybe a) -> [(String, a)] -> MacroEnv -> MacroID -> MacroDescriptor -> MacroDescriptor
runTests' :: (Eq a, Show a) => RegexType -> (Match String -> Maybe a) -> [(String, a)] -> MacroEnv -> MacroID -> MacroDescriptor -> MacroDescriptor
formatMacroTable :: RegexType -> MacroEnv -> String
dumpMacroTable :: String -> RegexType -> MacroEnv -> IO ()
formatMacroSummary :: RegexType -> MacroEnv -> MacroID -> String
formatMacroSources :: RegexType -> WithCaptures -> MacroEnv -> String
formatMacroSource :: RegexType -> WithCaptures -> MacroEnv -> MacroID -> String
testMacroDescriptors :: [MacroDescriptor] -> [TestResult]
instance GHC.Show.Show Text.RE.TestBench.Col
instance GHC.Classes.Eq Text.RE.TestBench.Col
instance GHC.Classes.Ord Text.RE.TestBench.Col
instance GHC.Enum.Enum Text.RE.TestBench.Col
instance GHC.Enum.Bounded Text.RE.TestBench.Col
instance GHC.Arr.Ix Text.RE.TestBench.Col
instance GHC.Show.Show Text.RE.TestBench.REToken
instance GHC.Show.Show Text.RE.TestBench.MacroDescriptor
instance GHC.Show.Show Text.RE.TestBench.FunctionID
instance Data.String.IsString Text.RE.TestBench.FunctionID
instance GHC.Show.Show Text.RE.TestBench.RegexSource
instance Data.String.IsString Text.RE.TestBench.RegexSource
instance GHC.Show.Show Text.RE.TestBench.TestResult
instance Data.String.IsString Text.RE.TestBench.TestResult
instance GHC.Show.Show Text.RE.TestBench.WithCaptures
instance GHC.Classes.Ord Text.RE.TestBench.WithCaptures
instance GHC.Classes.Eq Text.RE.TestBench.WithCaptures
instance GHC.Show.Show Text.RE.TestBench.RegexType
instance GHC.Classes.Ord Text.RE.TestBench.RegexType
instance GHC.Classes.Eq Text.RE.TestBench.RegexType
instance GHC.Enum.Enum Text.RE.TestBench.RegexType
instance GHC.Enum.Bounded Text.RE.TestBench.RegexType
module Text.RE.Internal.PreludeMacros
-- | what kind of back end will be compiling the RE
data RegexType
TDFA :: RegexType
PCRE :: RegexType
-- | do we need the captures in the RE or whould they be stripped out where
-- possible
data WithCaptures
InclCaptures :: WithCaptures
ExclCaptures :: WithCaptures
-- | describes a macro, giving the text of the RE and a si=ummary
-- description
data MacroDescriptor
MacroDescriptor :: !RegexSource -> ![String] -> ![String] -> ![TestResult] -> !(Maybe FunctionID) -> !String -> MacroDescriptor
-- | the RE
[_md_source] :: MacroDescriptor -> !RegexSource
-- | some sample matches
[_md_samples] :: MacroDescriptor -> ![String]
-- | some sample non-matches
[_md_counter_samples] :: MacroDescriptor -> ![String]
-- | validation test results
[_md_test_results] :: MacroDescriptor -> ![TestResult]
-- | WA, the parser function
[_md_parser] :: MacroDescriptor -> !(Maybe FunctionID)
-- | summary comment
[_md_description] :: MacroDescriptor -> !String
-- | a RE that should work for POSIX and PCRE with open brackets ('(')
-- represented as follows: ( mere symbol (?: used for grouping only, not
-- for captures (}: used for captures only, not for grouping (]: used for
-- captures and grouping ( do not modify
newtype RegexSource
RegexSource :: String -> RegexSource
[_RegexSource] :: RegexSource -> String
-- | an enumeration of all of the prelude macros
data PreludeMacro
PM_nat :: PreludeMacro
PM_hex :: PreludeMacro
PM_int :: PreludeMacro
PM_frac :: PreludeMacro
PM_string :: PreludeMacro
PM_string_simple :: PreludeMacro
PM_id :: PreludeMacro
PM_id' :: PreludeMacro
PM_id_ :: PreludeMacro
PM_date :: PreludeMacro
PM_date_slashes :: PreludeMacro
PM_time :: PreludeMacro
PM_timezone :: PreludeMacro
PM_datetime :: PreludeMacro
PM_datetime_8601 :: PreludeMacro
PM_datetime_clf :: PreludeMacro
PM_shortmonth :: PreludeMacro
PM_address_ipv4 :: PreludeMacro
PM_email_simple :: PreludeMacro
PM_url :: PreludeMacro
PM_syslog_severity :: PreludeMacro
-- | naming the macros
presentPreludeMacro :: PreludeMacro -> String
preludeMacros :: (Monad m, Functor m) => (String -> m r) -> RegexType -> WithCaptures -> m (Macros r)
preludeMacroTable :: RegexType -> String
preludeMacroSummary :: RegexType -> PreludeMacro -> String
preludeMacroSources :: RegexType -> String
preludeMacroSource :: RegexType -> PreludeMacro -> String
preludeMacroEnv :: RegexType -> MacroEnv
preludeMacroDescriptor :: RegexType -> MacroEnv -> PreludeMacro -> Maybe MacroDescriptor
instance GHC.Show.Show Text.RE.Internal.PreludeMacros.PreludeMacro
instance GHC.Classes.Eq Text.RE.Internal.PreludeMacros.PreludeMacro
instance GHC.Classes.Ord Text.RE.Internal.PreludeMacros.PreludeMacro
instance GHC.Enum.Enum Text.RE.Internal.PreludeMacros.PreludeMacro
instance GHC.Enum.Bounded Text.RE.Internal.PreludeMacros.PreludeMacro
module Text.RE.Tools.Grep
data Line
Line :: LineNo -> Matches ByteString -> Line
[_ln_no] :: Line -> LineNo
[_ln_matches] :: Line -> Matches ByteString
grep :: IsRegex re ByteString => re -> FilePath -> IO ()
grepLines :: IsRegex re ByteString => re -> FilePath -> IO [Line]
type GrepScript re s t = [(re, LineNo -> Matches s -> Maybe t)]
grepScript :: IsRegex re s => GrepScript re s t -> [s] -> [t]
linesMatched :: [Line] -> [Line]
instance GHC.Show.Show Text.RE.Tools.Grep.Line
module Text.RE.Tools.Lex
alex :: IsRegex re s => [(re, Match s -> Maybe t)] -> t -> s -> [t]
alex' :: Replace s => (re -> s -> Match s) -> [(re, Match s -> Maybe t)] -> t -> s -> [t]
module Text.RE
-- | the result type to use when every match is needed, not just the first
-- match of the RE against the source
data Matches a
Matches :: !a -> ![Match a] -> Matches a
-- | the source text being matched
[matchesSource] :: Matches a -> !a
-- | all captures found, left to right
[allMatches] :: Matches a -> ![Match a]
-- | the result of matching a RE to a text once, listing the text that was
-- matched and the named captures in the RE and all of the substrings
-- matched, with the text captured by the whole RE; a complete failure to
-- match will be represented with an empty array (with bounds (0,-1))
data Match a
Match :: !a -> !CaptureNames -> !(Array CaptureOrdinal (Capture a)) -> Match a
-- | the whole source text
[matchSource] :: Match a -> !a
-- | the RE's capture names
[captureNames] :: Match a -> !CaptureNames
-- |
-- - .n-1 captures, starting with the text matched by the whole RE
--
[matchArray] :: Match a -> !(Array CaptureOrdinal (Capture a))
-- | the matching of a single sub-expression against part of the source
-- text
data Capture a
Capture :: !a -> !a -> !Int -> !Int -> Capture a
-- | the whole text that was searched
[captureSource] :: Capture a -> !a
-- | the text that was matched
[capturedText] :: Capture a -> !a
-- | the number of characters preceding the match with -1 used if no text
-- was captured by the RE (not even the empty string)
[captureOffset] :: Capture a -> !Int
-- | the number of chacter in the captured sub-string
[captureLength] :: Capture a -> !Int
-- | Construct a Match that does not match anything.
noMatch :: a -> Match a
-- | tests whether the RE matched the source text at all
anyMatches :: Matches a -> Bool
-- | count the matches
countMatches :: Matches a -> Int
matches :: Matches a -> [a]
-- | extract the main capture from each match
mainCaptures :: Matches a -> [Capture a]
-- | tests whether the RE matched the source text at all
matched :: Match a -> Bool
-- | tests whether the RE matched the source text at all
matchedText :: Match a -> Maybe a
-- | the top-level capture if the source text matched the RE, Nothing
-- otherwise
matchCapture :: Match a -> Maybe (Capture a)
-- | the top-level capture and the sub captures if the text matched the RE,
-- Nothing otherwise
matchCaptures :: Match a -> Maybe (Capture a, [Capture a])
-- | an alternative for captureText
(!$$) :: Match a -> CaptureID -> a
infixl 9 !$$
-- | look up the text of the nth capture, 0 being the match of the whole RE
-- against the source text, 1, the first bracketed sub-expression to be
-- matched and so on
captureText :: CaptureID -> Match a -> a
-- | an alternative for captureTextMaybe
(!$$?) :: Match a -> CaptureID -> Maybe a
-- | look up the text of the nth capture (0 being the match of the whole),
-- returning Nothing if the Match doesn't contain the capture
captureTextMaybe :: CaptureID -> Match a -> Maybe a
-- | an alternative for capture
(!$) :: Match a -> CaptureID -> Capture a
infixl 9 !$
-- | look up the nth capture, 0 being the match of the whole RE against the
-- source text, 1, the first bracketed sub-expression to be matched and
-- so on
capture :: CaptureID -> Match a -> Capture a
-- | an alternative for capture captureMaybe
(!$?) :: Match a -> CaptureID -> Maybe (Capture a)
-- | look up the nth capture, 0 being the match of the whole RE against the
-- source text, 1, the first bracketed sub-expression to be matched and
-- so on, returning Nothing if there is no such capture, or if the
-- capture failed to capture anything (being in a failed alternate)
captureMaybe :: CaptureID -> Match a -> Maybe (Capture a)
-- | test if the capture has matched any text
hasCaptured :: Capture a -> Bool
-- | returns the text preceding the match
capturePrefix :: Extract a => Capture a -> a
-- | returns the text after the match
captureSuffix :: Extract a => Capture a -> a
class Replace s => IsRegex re s
matchOnce :: IsRegex re s => re -> s -> Match s
matchMany :: IsRegex re s => re -> s -> Matches s
regexSource :: IsRegex re s => re -> String
data Options_ r c e
Options :: !Mode -> !(Macros r) -> !c -> !e -> Options_ r c e
[_options_mode] :: Options_ r c e -> !Mode
[_options_macs] :: Options_ r c e -> !(Macros r)
[_options_comp] :: Options_ r c e -> !c
[_options_exec] :: Options_ r c e -> !e
class IsOption o r c e | e -> r, c -> e, e -> c, r -> c, c -> r, r -> e
makeOptions :: IsOption o r c e => o -> Options_ r c e
data Mode
Simple :: Mode
Block :: Mode
newtype MacroID
MacroID :: String -> MacroID
[_MacroID] :: MacroID -> String
type Macros r = HashMap MacroID r
emptyMacros :: Macros r
data SimpleRegexOptions
MultilineSensitive :: SimpleRegexOptions
MultilineInsensitive :: SimpleRegexOptions
BlockSensitive :: SimpleRegexOptions
BlockInsensitive :: SimpleRegexOptions
data CaptureID
CID_ordinal :: CaptureOrdinal -> CaptureID
CID_name :: CaptureName -> CaptureID
type CaptureNames = HashMap CaptureName CaptureOrdinal
noCaptureNames :: CaptureNames
newtype CaptureName
CaptureName :: Text -> CaptureName
[getCaptureName] :: CaptureName -> Text
newtype CaptureOrdinal
CaptureOrdinal :: Int -> CaptureOrdinal
[getCaptureOrdinal] :: CaptureOrdinal -> Int
findCaptureID :: CaptureID -> CaptureNames -> Int
data Edits m re s
Select :: [(re, Edit m s)] -> Edits m re s
Pipe :: [(re, Edit m s)] -> Edits m re s
data Edit m s
EDIT_tpl :: s -> Edit m s
EDIT_phi :: (Phi s) -> Edit m s
EDIT_fun :: Context -> (LineNo -> Match s -> Location -> Capture s -> m (Maybe s)) -> Edit m s
EDIT_gen :: (LineNo -> Matches s -> m (LineEdit s)) -> Edit m s
data LineEdit s
NoEdit :: LineEdit s
ReplaceWith :: s -> LineEdit s
Delete :: LineEdit s
applyEdits :: (IsRegex re s, Monad m, Functor m) => LineNo -> Edits m re s -> s -> m s
applyEdit :: (IsRegex re s, Monad m, Functor m) => (s -> s) -> LineNo -> re -> Edit m s -> s -> m (Maybe s)
applyLineEdit :: Monoid s => (s -> s) -> LineEdit s -> Maybe s
newtype LineNo
ZeroBasedLineNo :: Int -> LineNo
[getZeroBasedLineNo] :: LineNo -> Int
firstLine :: LineNo
getLineNo :: LineNo -> Int
lineNo :: Int -> LineNo
parseInteger :: Replace a => a -> Maybe Int
parseHex :: Replace a => a -> Maybe Int
parseDouble :: Replace a => a -> Maybe Double
parseString :: Replace a => a -> Maybe Text
parseSimpleString :: Replace a => a -> Maybe Text
parseDate :: Replace a => a -> Maybe Day
parseSlashesDate :: Replace a => a -> Maybe Day
parseTimeOfDay :: Replace a => a -> Maybe TimeOfDay
parseTimeZone :: Replace a => a -> Maybe TimeZone
parseDateTime :: Replace a => a -> Maybe UTCTime
parseDateTime8601 :: Replace a => a -> Maybe UTCTime
parseDateTimeCLF :: Replace a => a -> Maybe UTCTime
parseShortMonth :: Replace a => a -> Maybe Int
shortMonthArray :: Array Int Text
type IPV4Address = (Word8, Word8, Word8, Word8)
parseIPv4Address :: Replace a => a -> Maybe IPV4Address
data Severity
Emerg :: Severity
Alert :: Severity
Crit :: Severity
Err :: Severity
Warning :: Severity
Notice :: Severity
Info :: Severity
Debug :: Severity
parseSeverity :: Replace a => a -> Maybe Severity
severityKeywords :: Severity -> (Text, [Text])
-- | Replace provides the missing methods needed to replace the matched
-- text; length_ is the minimum implementation
class (Extract a, Monoid a) => Replace a where textify = pack . unpack_ detextify = pack_ . unpack appendNewline = (<> pack_ "\n") subst f m@(Capture {..}) = capturePrefix m <> f capturedText <> captureSuffix m
-- | length function for a
length_ :: Replace a => a -> Int
-- | inject String into a
pack_ :: Replace a => String -> a
-- | project a onto a String
unpack_ :: Replace a => a -> String
-- | inject into Text
textify :: Replace a => a -> Text
-- | project Text onto a
detextify :: Replace a => Text -> a
-- | append a newline
appendNewline :: Replace a => a -> a
-- | apply a substitution function to a Capture
subst :: Replace a => (a -> a) -> Capture a -> a
-- | convert a template containing $0, $1, etc., in the first argument,
-- into a phi replacement function for use with
-- replaceAllCaptures' and replaceCaptures'
parse_tpl :: Replace a => a -> Match a -> Location -> Capture a -> Maybe a
-- | a selction of the Replace methods can be encapsulated with Replace_
-- for the higher-order replacement functions
data Replace_ a
Replace_ :: (a -> Int) -> ((a -> a) -> Capture a -> a) -> Replace_ a
[_r_length] :: Replace_ a -> a -> Int
[_r_subst] :: Replace_ a -> (a -> a) -> Capture a -> a
-- | replace_ encapsulates Replace_ a from a Replace a context
replace_ :: Replace a => Replace_ a
-- | Phi specifies the substitution function for procesing the
-- substrings captured by the regular expression.
data Phi a
Phi :: Context -> (Location -> a -> a) -> Phi a
-- | the context for applying the substitution
[_phi_context] :: Phi a -> Context
-- | the substitution function takes the location and the text to be
-- replaced and returns the replacement text to be substituted
[_phi_phi] :: Phi a -> Location -> a -> a
-- | Context specifies which contexts the substitutions should be
-- applied
data Context
-- | substitutions should be applied to the top-level only, the text that
-- matched the whole RE
TOP :: Context
-- | substitutions should only be applied to the text captured by bracketed
-- sub-REs
SUB :: Context
-- | the substitution function should be applied to all captures, the top
-- level and the sub-expression captures
ALL :: Context
-- | the Location information passed into the substitution
-- function specifies which sub-expression is being substituted
data Location
Location :: Int -> CaptureOrdinal -> Location
-- | the zero-based, i-th string to be matched, when matching all strings,
-- zero when only the first string is being matched
[_loc_match] :: Location -> Int
-- | 0, when matching the top-level string matched by the whole RE, 1 for
-- the top-most, left-most redex captured by bracketed sub-REs, etc.
[_loc_capture] :: Location -> CaptureOrdinal
-- | True iff the location references a complete match (i.e., not a
-- bracketed capture)
isTopLocation :: Location -> Bool
replace :: Replace a => Match a -> a -> a
-- | replace all with a template, $0 for whole text, $1 for first capture,
-- etc.
replaceAll :: Replace a => a -> Matches a -> a
-- | substitutes the PHI substitutions through the Matches
replaceAllCaptures :: Replace a => Phi a -> Matches a -> a
-- | substitutes using a function that takes the full Match context and
-- returns the same replacement text as the _phi_phi context.
replaceAllCaptures' :: Replace a => Context -> (Match a -> Location -> Capture a -> Maybe a) -> Matches a -> a
-- | replaceAllCaptures_ is like like replaceAllCaptures' but takes the
-- Replace methods through the Replace_ argument
replaceAllCaptures_ :: Extract a => Replace_ a -> Context -> (Match a -> Location -> Capture a -> Maybe a) -> Matches a -> a
-- | replaceAllCapturesM is just a monadically generalised version of
-- replaceAllCaptures_
replaceAllCapturesM :: (Extract a, Monad m) => Replace_ a -> Context -> (Match a -> Location -> Capture a -> m (Maybe a)) -> Matches a -> m a
-- | substitutes the PHI substitutions through the Match
replaceCaptures :: Replace a => Phi a -> Match a -> a
-- | substitutes using a function that takes the full Match context and
-- returns the same replacement text as the _phi_phi context.
replaceCaptures' :: Replace a => Context -> (Match a -> Location -> Capture a -> Maybe a) -> Match a -> a
-- | replaceCaptures_ is like replaceCaptures' but takes the Replace
-- methods through the Replace_ argument
replaceCaptures_ :: Extract a => Replace_ a -> Context -> (Match a -> Location -> Capture a -> Maybe a) -> Match a -> a
-- | replaceCapturesM is just a monadically generalised version of
-- replaceCaptures_
replaceCapturesM :: (Monad m, Extract a) => Replace_ a -> Context -> (Match a -> Location -> Capture a -> m (Maybe a)) -> Match a -> m a
-- | expand all of the @{..} macros in the RE in the argument String
-- according to the Macros argument, preprocessing the RE String
-- according to the Mode argument (used internally)
expandMacros :: (r -> String) -> Mode -> Macros r -> String -> String
-- | expand the @{..} macos in the argument string using the given function
expandMacros' :: (MacroID -> Maybe String) -> String -> String
data Line
Line :: LineNo -> Matches ByteString -> Line
[_ln_no] :: Line -> LineNo
[_ln_matches] :: Line -> Matches ByteString
grep :: IsRegex re ByteString => re -> FilePath -> IO ()
grepLines :: IsRegex re ByteString => re -> FilePath -> IO [Line]
type GrepScript re s t = [(re, LineNo -> Matches s -> Maybe t)]
grepScript :: IsRegex re s => GrepScript re s t -> [s] -> [t]
linesMatched :: [Line] -> [Line]
alex :: IsRegex re s => [(re, Match s -> Maybe t)] -> t -> s -> [t]
alex' :: Replace s => (re -> s -> Match s) -> [(re, Match s -> Maybe t)] -> t -> s -> [t]
type SedScript re = Edits IO re ByteString
sed :: IsRegex re ByteString => SedScript re -> FilePath -> FilePath -> IO ()
sed' :: (IsRegex re ByteString, Monad m, Functor m) => Edits m re ByteString -> ByteString -> m ByteString
module Text.RE.Internal.NamedCaptures
cp :: QuasiQuoter
extractNamedCaptures :: String -> Either String (CaptureNames, String)
idFormatTokenOptions :: FormatTokenOptions
data Token
ECap :: (Maybe String) -> Token
PGrp :: Token
PCap :: Token
Bra :: Token
BS :: Char -> Token
Other :: Char -> Token
validToken :: Token -> Bool
formatTokens :: [Token] -> String
formatTokens' :: FormatTokenOptions -> [Token] -> String
formatTokens0 :: [Token] -> String
scan :: String -> [Token]
instance GHC.Show.Show Text.RE.Internal.NamedCaptures.FormatTokenOptions
instance GHC.Classes.Eq Text.RE.Internal.NamedCaptures.Token
instance GHC.Generics.Generic Text.RE.Internal.NamedCaptures.Token
instance GHC.Show.Show Text.RE.Internal.NamedCaptures.Token
module Text.RE.PCRE.RE
re :: QuasiQuoter
reMS :: QuasiQuoter
reMI :: QuasiQuoter
reBS :: QuasiQuoter
reBI :: QuasiQuoter
reMultilineSensitive :: QuasiQuoter
reMultilineInsensitive :: QuasiQuoter
reBlockSensitive :: QuasiQuoter
reBlockInsensitive :: QuasiQuoter
re_ :: QuasiQuoter
cp :: QuasiQuoter
regexType :: RegexType
data RE
reOptions :: RE -> Options
reSource :: RE -> String
reCaptureNames :: RE -> CaptureNames
reRegex :: RE -> Regex
type Options = Options_ RE CompOption ExecOption
prelude :: Macros RE
preludeEnv :: MacroEnv
preludeTestsFailing :: [MacroID]
preludeTable :: String
preludeSummary :: PreludeMacro -> String
preludeSources :: String
preludeSource :: PreludeMacro -> String
noPreludeOptions :: Options
defaultOptions :: Options
unpackSimpleRegexOptions :: SimpleRegexOptions -> Options
compileRegex :: (IsOption o RE CompOption ExecOption, Functor m, Monad m) => o -> String -> m 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
instance Text.RE.Options.IsOption Text.RE.Options.Mode Text.RE.PCRE.RE.RE Text.Regex.PCRE.Wrap.CompOption Text.Regex.PCRE.Wrap.ExecOption
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
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
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
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
instance Text.RE.Options.IsOption () Text.RE.PCRE.RE.RE Text.Regex.PCRE.Wrap.CompOption Text.Regex.PCRE.Wrap.ExecOption
module Text.RE.PCRE.ByteString
-- | find all matches in text
(*=~) :: ByteString -> RE -> Matches ByteString
-- | find first matches in text
(?=~) :: ByteString -> RE -> Match ByteString
-- | regex-base polymorphic match operator
(=~) :: (RegexContext Regex ByteString a, RegexMaker Regex CompOption ExecOption String) => ByteString -> RE -> a
-- | regex-base monadic, polymorphic match operator
(=~~) :: (Monad m, RegexContext Regex ByteString a, RegexMaker Regex CompOption ExecOption String) => ByteString -> RE -> m a
instance Text.RE.IsRegex.IsRegex Text.RE.PCRE.RE.RE Data.ByteString.Internal.ByteString
module Text.RE.PCRE.ByteString.Lazy
-- | find all matches in text
(*=~) :: ByteString -> RE -> Matches ByteString
-- | find first matches in text
(?=~) :: ByteString -> RE -> Match ByteString
-- | regex-base polymorphic match operator
(=~) :: (RegexContext Regex ByteString a, RegexMaker Regex CompOption ExecOption String) => ByteString -> RE -> a
-- | regex-base monadic, polymorphic match operator
(=~~) :: (Monad m, RegexContext Regex ByteString a, RegexMaker Regex CompOption ExecOption String) => ByteString -> RE -> m a
instance Text.RE.IsRegex.IsRegex Text.RE.PCRE.RE.RE Data.ByteString.Lazy.Internal.ByteString
module Text.RE.PCRE.Sequence
-- | find all matches in text
(*=~) :: (Seq Char) -> RE -> Matches (Seq Char)
-- | find first matches in text
(?=~) :: (Seq Char) -> RE -> Match (Seq Char)
-- | regex-base polymorphic match operator
(=~) :: (RegexContext Regex (Seq Char) a, RegexMaker Regex CompOption ExecOption String) => (Seq Char) -> RE -> a
-- | regex-base monadic, polymorphic match operator
(=~~) :: (Monad m, RegexContext Regex (Seq Char) a, RegexMaker Regex CompOption ExecOption String) => (Seq Char) -> RE -> m a
instance Text.RE.IsRegex.IsRegex Text.RE.PCRE.RE.RE (Data.Sequence.Seq GHC.Types.Char)
module Text.RE.PCRE.String
-- | find all matches in text
(*=~) :: String -> RE -> Matches String
-- | find first matches in text
(?=~) :: String -> RE -> Match String
-- | regex-base polymorphic match operator
(=~) :: (RegexContext Regex String a, RegexMaker Regex CompOption ExecOption String) => String -> RE -> a
-- | regex-base monadic, polymorphic match operator
(=~~) :: (Monad m, RegexContext Regex String a, RegexMaker Regex CompOption ExecOption String) => String -> RE -> m a
instance Text.RE.IsRegex.IsRegex Text.RE.PCRE.RE.RE GHC.Base.String
module Text.RE.PCRE
(*=~) :: IsRegex RE s => s -> RE -> Matches s
(?=~) :: IsRegex RE s => s -> RE -> Match s
(=~) :: (RegexContext Regex s a, RegexMaker Regex CompOption ExecOption s) => s -> RE -> a
(=~~) :: (Monad m, RegexContext Regex s a, RegexMaker Regex CompOption ExecOption s) => s -> RE -> m a
module Text.RE.TDFA.RE
re :: QuasiQuoter
reMS :: QuasiQuoter
reMI :: QuasiQuoter
reBS :: QuasiQuoter
reBI :: QuasiQuoter
reMultilineSensitive :: QuasiQuoter
reMultilineInsensitive :: QuasiQuoter
reBlockSensitive :: QuasiQuoter
reBlockInsensitive :: QuasiQuoter
re_ :: QuasiQuoter
cp :: QuasiQuoter
regexType :: RegexType
data RE
reOptions :: RE -> Options
reSource :: RE -> String
reCaptureNames :: RE -> CaptureNames
reRegex :: RE -> Regex
type Options = Options_ RE CompOption ExecOption
noPreludeOptions :: Options
defaultOptions :: Options
prelude :: Macros RE
preludeEnv :: MacroEnv
preludeTestsFailing :: [MacroID]
preludeTable :: String
preludeSummary :: PreludeMacro -> String
preludeSources :: String
preludeSource :: PreludeMacro -> String
unpackSimpleRegexOptions :: SimpleRegexOptions -> Options
compileRegex :: (IsOption o RE CompOption ExecOption, Functor m, Monad m) => o -> String -> m RE
instance Text.RE.Options.IsOption Text.RE.Options.SimpleRegexOptions Text.RE.TDFA.RE.RE Text.Regex.TDFA.Common.CompOption Text.Regex.TDFA.Common.ExecOption
instance Text.RE.Options.IsOption Text.RE.Options.Mode Text.RE.TDFA.RE.RE Text.Regex.TDFA.Common.CompOption Text.Regex.TDFA.Common.ExecOption
instance Text.RE.Options.IsOption (Text.RE.Options.Macros Text.RE.TDFA.RE.RE) Text.RE.TDFA.RE.RE Text.Regex.TDFA.Common.CompOption Text.Regex.TDFA.Common.ExecOption
instance Text.RE.Options.IsOption Text.Regex.TDFA.Common.CompOption Text.RE.TDFA.RE.RE Text.Regex.TDFA.Common.CompOption Text.Regex.TDFA.Common.ExecOption
instance Text.RE.Options.IsOption Text.Regex.TDFA.Common.ExecOption Text.RE.TDFA.RE.RE Text.Regex.TDFA.Common.CompOption Text.Regex.TDFA.Common.ExecOption
instance Text.RE.Options.IsOption Text.RE.TDFA.RE.Options Text.RE.TDFA.RE.RE Text.Regex.TDFA.Common.CompOption Text.Regex.TDFA.Common.ExecOption
instance Text.RE.Options.IsOption () Text.RE.TDFA.RE.RE Text.Regex.TDFA.Common.CompOption Text.Regex.TDFA.Common.ExecOption
module Text.RE.TDFA.ByteString
-- | find all matches in text
(*=~) :: ByteString -> RE -> Matches ByteString
-- | find first matches in text
(?=~) :: ByteString -> RE -> Match ByteString
-- | regex-base polymorphic match operator
(=~) :: (RegexContext Regex ByteString a, RegexMaker Regex CompOption ExecOption String) => ByteString -> RE -> a
-- | regex-base monadic, polymorphic match operator
(=~~) :: (Monad m, RegexContext Regex ByteString a, RegexMaker Regex CompOption ExecOption String) => ByteString -> RE -> m a
instance Text.RE.IsRegex.IsRegex Text.RE.TDFA.RE.RE Data.ByteString.Internal.ByteString
module Text.RE.TDFA.ByteString.Lazy
-- | find all matches in text
(*=~) :: ByteString -> RE -> Matches ByteString
-- | find first matches in text
(?=~) :: ByteString -> RE -> Match ByteString
-- | regex-base polymorphic match operator
(=~) :: (RegexContext Regex ByteString a, RegexMaker Regex CompOption ExecOption String) => ByteString -> RE -> a
-- | regex-base monadic, polymorphic match operator
(=~~) :: (Monad m, RegexContext Regex ByteString a, RegexMaker Regex CompOption ExecOption String) => ByteString -> RE -> m a
instance Text.RE.IsRegex.IsRegex Text.RE.TDFA.RE.RE Data.ByteString.Lazy.Internal.ByteString
module Text.RE.TDFA.Sequence
-- | find all matches in text
(*=~) :: (Seq Char) -> RE -> Matches (Seq Char)
-- | find first matches in text
(?=~) :: (Seq Char) -> RE -> Match (Seq Char)
-- | regex-base polymorphic match operator
(=~) :: (RegexContext Regex (Seq Char) a, RegexMaker Regex CompOption ExecOption String) => (Seq Char) -> RE -> a
-- | regex-base monadic, polymorphic match operator
(=~~) :: (Monad m, RegexContext Regex (Seq Char) a, RegexMaker Regex CompOption ExecOption String) => (Seq Char) -> RE -> m a
instance Text.RE.IsRegex.IsRegex Text.RE.TDFA.RE.RE (Data.Sequence.Seq GHC.Types.Char)
module Text.RE.TDFA.String
-- | find all matches in text
(*=~) :: String -> RE -> Matches String
-- | find first matches in text
(?=~) :: String -> RE -> Match String
-- | regex-base polymorphic match operator
(=~) :: (RegexContext Regex String a, RegexMaker Regex CompOption ExecOption String) => String -> RE -> a
-- | regex-base monadic, polymorphic match operator
(=~~) :: (Monad m, RegexContext Regex String a, RegexMaker Regex CompOption ExecOption String) => String -> RE -> m a
instance Text.RE.IsRegex.IsRegex Text.RE.TDFA.RE.RE GHC.Base.String
module Text.RE.TDFA.Text
-- | find all matches in text
(*=~) :: Text -> RE -> Matches Text
-- | find first matches in text
(?=~) :: Text -> RE -> Match Text
-- | regex-base polymorphic match operator
(=~) :: (RegexContext Regex Text a, RegexMaker Regex CompOption ExecOption String) => Text -> RE -> a
-- | regex-base monadic, polymorphic match operator
(=~~) :: (Monad m, RegexContext Regex Text a, RegexMaker Regex CompOption ExecOption String) => Text -> RE -> m a
instance Text.RE.IsRegex.IsRegex Text.RE.TDFA.RE.RE Data.Text.Internal.Text
module Text.RE.TDFA.Text.Lazy
-- | find all matches in text
(*=~) :: Text -> RE -> Matches Text
-- | find first matches in text
(?=~) :: Text -> RE -> Match Text
-- | regex-base polymorphic match operator
(=~) :: (RegexContext Regex Text a, RegexMaker Regex CompOption ExecOption String) => Text -> RE -> a
-- | regex-base monadic, polymorphic match operator
(=~~) :: (Monad m, RegexContext Regex Text a, RegexMaker Regex CompOption ExecOption String) => Text -> RE -> m a
instance Text.RE.IsRegex.IsRegex Text.RE.TDFA.RE.RE Data.Text.Internal.Lazy.Text
module Text.RE.TDFA
(*=~) :: IsRegex RE s => s -> RE -> Matches s
(?=~) :: IsRegex RE s => s -> RE -> Match s
(=~) :: (RegexContext Regex s a, RegexMaker Regex CompOption ExecOption s) => s -> RE -> a
(=~~) :: (Monad m, RegexContext Regex s a, RegexMaker Regex CompOption ExecOption s) => s -> RE -> m a