Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Regex :: *
- data CompOption :: *
- data ExecOption :: *
- compile :: (ProjectChar a, Monad m, Foldable m, Functor m) => CompOption -> ExecOption -> Producer a m () -> Either String Regex
- execute :: (ProjectChar a, Monad m, Foldable m, Functor m) => Regex -> Producer a m () -> Either a (Maybe MatchArray)
- regexec :: (ProjectChar a, Monad m, Foldable m, Functor m) => Regex -> Producer a m () -> Either String (Maybe (Producer a m (), Producer a m (), Producer a m (), [Producer a m ()]))
- class ProjectChar a where
- projectChar :: a -> Char
Documentation
data Regex :: *
The TDFA backend specific Regex
type, used by this module's RegexOptions and RegexMaker
data CompOption :: *
Control whether the pattern is multiline or case-sensitive like Text.Regex and whether to capture the subgroups (1, 2, etc). Controls enabling extra anchor syntax.
data ExecOption :: *
compile :: (ProjectChar a, Monad m, Foldable m, Functor m) => CompOption -> ExecOption -> Producer a m () -> Either String Regex Source
Takes the output of a Producer to form a regular expression. This expression is then compiled using the options provided. If compilation fails an error message is returned.
If your regular expression is expressed as a String literal or some other Data.Foldable then "Pipes.each" is useful.
execute :: (ProjectChar a, Monad m, Foldable m, Functor m) => Regex -> Producer a m () -> Either a (Maybe MatchArray) Source
Execute a compiled regular expression on the output of a Producer.
regexec :: (ProjectChar a, Monad m, Foldable m, Functor m) => Regex -> Producer a m () -> Either String (Maybe (Producer a m (), Producer a m (), Producer a m (), [Producer a m ()])) Source
class ProjectChar a where Source
Types which can have a Char projected from them.
projectChar :: a -> Char Source
Project a Char from the type.
ProjectChar Char | |
ProjectChar a => ProjectChar (Identity a) | |
(ProjectChar a, ProjectChar b) => ProjectChar (Either a b) |