Text.Regex.TDFA.Wrap
Description
Text.Regex.TDFA.Wrap provides the instance of RegexOptions and the definition of (=~) and (=~~). This is all re-exported by Text.Regex.TDFA.
- data Regex = Regex {}
- data CompOption = CompOption {
- caseSensitive :: Bool
- multiline :: Bool
- rightAssoc :: Bool
- lastStarGreedy :: Bool
- data ExecOption = ExecOption {
- captureGroups :: Bool
- testMatch :: Bool
- (=~) :: (RegexMaker Regex CompOption ExecOption source, RegexContext Regex source1 target) => source1 -> source -> target
- (=~~) :: (RegexMaker Regex CompOption ExecOption source, RegexContext Regex source1 target, Monad m) => source1 -> source -> m target
Documentation
The TDFA backend specific Regex
type, used by this module's RegexOptions and RegexMaker
Constructors
Regex | |
Fields
|
Instances
data CompOption Source
Control whether the pattern is multiline or case-sensitive like Text.Regex and whether to capture the subgroups (1, 2, etc).
Constructors
CompOption | |
Fields
|
data ExecOption Source
Constructors
ExecOption | |
Fields
|
(=~) :: (RegexMaker Regex CompOption ExecOption source, RegexContext Regex source1 target) => source1 -> source -> targetSource
This is the pure functional matching operator. If the target
cannot be produced then some empty result will be returned. If
there is an error in processing, then error
will be called.
(=~~) :: (RegexMaker Regex CompOption ExecOption source, RegexContext Regex source1 target, Monad m) => source1 -> source -> m targetSource
This is the monadic matching operator. If a single match fails,
then fail
will be called.