Module
Type.Regex.Match
- Package
- purescript-typelevel-regex
- Repository
- thought2/purescript-typelevel-regex
#MatchRegex Source
class MatchRegex :: Regex -> Symbol -> Constraintclass MatchRegex (regex :: Regex) (str :: Symbol)
Instances
(RegexAttemptGo regex str rest matches, MatchRegexResult rest matches) => MatchRegex (Cat StartOfStr regex) str(ScanRegexGo regex str rest matches, MatchRegexResult rest matches) => MatchRegex regex str
#MatchRegexResult Source
class MatchRegexResult :: Symbol -> Boolean -> Constraintclass MatchRegexResult (rest :: Symbol) (matches :: Boolean)
Instances
MatchRegexResult rest True(Fail (Above (Text "Regex failed to match.") (Beside (Text "Unmatched rest is: ") (Text rest)))) => MatchRegexResult rest matches
#ScanRegexGo Source
class ScanRegexGo :: Regex -> Symbol -> Symbol -> Boolean -> Constraintclass ScanRegexGo (regex :: Regex) (str :: Symbol) (rest :: Symbol) (matches :: Boolean) | regex str -> rest matches
Instances
ScanRegexGo regex "" "" False(RegexAttemptGo regex str rest matches, ScanRegexResult matches regex str rest' matches') => ScanRegexGo regex str rest' matches'
#ScanRegexResult Source
class ScanRegexResult :: Boolean -> Regex -> Symbol -> Symbol -> Boolean -> Constraintclass ScanRegexResult (result :: Boolean) (regex :: Regex) (str :: Symbol) (rest :: Symbol) (matches :: Boolean) | result regex str -> rest matches
Instances
ScanRegexResult True regex str rest TrueScanRegexResult False regex "" "" False(Cons head tail str, ScanRegexGo regex tail rest matches) => ScanRegexResult False regex str rest matches
#RegexAttemptGo Source
class RegexAttemptGo :: Regex -> Symbol -> Symbol -> Boolean -> Constraintclass RegexAttemptGo (regex :: Regex) (str :: Symbol) (rest :: Symbol) (matches :: Boolean) | regex str -> rest matches
Instances
RegexAttemptGo Nil str str True(IsFinalRegex regex True) => RegexAttemptGo regex "" "" True(Cons head tail str, RegexAttemptMatch regex head tail rest matches) => RegexAttemptGo regex str rest matches
#RegexAttemptMatch Source
class RegexAttemptMatch :: Regex -> Symbol -> Symbol -> Symbol -> Boolean -> Constraintclass RegexAttemptMatch (regex :: Regex) (head :: Symbol) (tail :: Symbol) (rest :: Symbol) (matches :: Boolean) | regex head tail -> rest matches
Instances
RegexAttemptMatch (Lit (UnsafeMkChar head)) head tail tail TrueRegexAttemptMatch Wildcard head tail tail True(Contains chars head matches, Not matches matches') => RegexAttemptMatch (NotLits chars) head tail tail matches'(Contains chars head matches) => RegexAttemptMatch (Lits chars) head tail tail matches(Cons head tail str) => RegexAttemptMatch Nil head tail str True(Cons head tail str, RegexAttemptGo regex1 str rest matches, RegexAttemptMatchCatResult regex2 matches rest rest' matches') => RegexAttemptMatch (Cat regex1 regex2) head tail rest' matches'(Cons head tail str, RegexAttemptGo regex1 str restLeft matches, RegexAttemptMatchAltResult regex2 matches restLeft str rest' matches') => RegexAttemptMatch (Alt regex1 regex2) head tail rest' matches'(Cons head tail sym, RegexAttemptGo regex sym restIn matches, RegexAttemptMatchManyResult matches regex sym restIn rest' matches') => RegexAttemptMatch (Many regex) head tail rest' matches'RegexAttemptMatch regex head tail tail False
#RegexAttemptMatchCatResult Source
class RegexAttemptMatchCatResult :: Regex -> Boolean -> Symbol -> Symbol -> Boolean -> Constraintclass RegexAttemptMatchCatResult (regex :: Regex) (matched :: Boolean) (restIn :: Symbol) (restOut :: Symbol) (matches :: Boolean) | regex matched restIn -> restOut matches
Instances
(RegexAttemptGo regex restIn restOut matches) => RegexAttemptMatchCatResult regex True restIn restOut matchesRegexAttemptMatchCatResult regex False rest rest False
#RegexAttemptMatchAltResult Source
class RegexAttemptMatchAltResult :: Regex -> Boolean -> Symbol -> Symbol -> Symbol -> Boolean -> Constraintclass RegexAttemptMatchAltResult (regex :: Regex) (matched :: Boolean) (restInLeft :: Symbol) (restInRight :: Symbol) (restOut :: Symbol) (matches :: Boolean) | regex matched restInLeft restInRight -> restOut matches
Instances
RegexAttemptMatchAltResult regex True rest restInRight rest True(RegexAttemptGo regex restIn restOut matches) => RegexAttemptMatchAltResult regex False restInLeft restIn restOut matches
#RegexAttemptMatchManyResult Source
class RegexAttemptMatchManyResult :: Boolean -> Regex -> Symbol -> Symbol -> Symbol -> Boolean -> Constraintclass RegexAttemptMatchManyResult (matched :: Boolean) (regex :: Regex) (backtrace :: Symbol) (restIn :: Symbol) (restOut :: Symbol) (matches :: Boolean) | matched regex backtrace restIn -> restOut matches
Instances
(RegexAttemptGo (Many regex) restIn restOut matches) => RegexAttemptMatchManyResult True regex backtrace restIn restOut matchesRegexAttemptMatchManyResult False regex backtrace restIn backtrace True
#IsFinalRegex Source
class IsFinalRegex :: Regex -> Boolean -> Constraintclass IsFinalRegex (regex :: Regex) (bool :: Boolean) | regex -> bool
Instances
IsFinalRegex EndOfStr TrueIsFinalRegex Nil True(IsFinalRegex regex1 bool1, IsFinalRegex regex2 bool2, Or bool1 bool2 bool) => IsFinalRegex (Alt regex1 regex2) bool(IsFinalRegex regex1 bool1, IsFinalRegex regex2 bool2, And bool1 bool2 bool) => IsFinalRegex (Cat regex1 regex2) boolIsFinalRegex (Many regex) TrueIsFinalRegex regex False
#ContainsMatch Source
class ContainsMatch :: Symbol -> Symbol -> Symbol -> Boolean -> Constraintclass ContainsMatch (head :: Symbol) (tail :: Symbol) (char :: Symbol) (result :: Boolean) | head tail char -> result
Instances
ContainsMatch char tail char True(Contains tail char result) => ContainsMatch head tail char result