RegexLike +regex-base

class Extract source => RegexLike regex source
regex-base Text.Regex.Base.RegexLike
RegexLike is parametrized on a regular expression type and a source type to run the matching on. There are default implementations: matchTest and matchOnceText use matchOnce; matchCount and matchAllText use matchAll. matchOnce uses matchOnceText and matchAll uses matchAllText. So a minimal complete instance need to provide at least (matchOnce or matchOnceText) and (matchAll or matchAllText). Additional definitions are often provided > [ c | let notVowel = makeRegex "[^aeiou]" :: Regex, c <- ['a'..'z'], matchTest notVowel [c] ] > > "bcdfghjklmnpqrstvwxyz" The strictness of these functions is instance dependent.
module Text.Regex.Base.RegexLike
regex-base Text.Regex.Base.RegexLike
Classes and instances for Regex matching. All the classes are declared here, and some common type aliases, and the MatchResult data type. The only instances here are for Extract String and Extract ByteString. There are no data values. The RegexContext instances are in Text.Regex.Base.Context, except for ones which run afoul of a repeated variable (RegexContext regex a a), which are defined in each modules' String and ByteString modules.