Module
Type.Regex.Compile
- Package
- purescript-typelevel-regex
- Repository
- thought2/purescript-typelevel-regex
#ErrorUnexpected Source
type ErrorUnexpected :: Doctype ErrorUnexpected = MkError (Text "Unexpected error. Please report this as a bug.")
#ErrorRange Source
type ErrorRange :: Doctype ErrorRange = MkError (Text "Range error")
#CompileRegex Source
class CompileRegex :: Regex -> Regex -> Constraintclass CompileRegex (cst :: Regex) (regex :: Regex) | cst -> regex
Instances
CompileRegex Nil NilCompileRegex Wildcard Wildcard(CompileCharClass charClass positive regex) => CompileRegex (RegexCharClass charClass positive) regexCompileRegex (Lit char) (Lit char)CompileRegex (Quote char) (Lit char)CompileRegex EndOfStr EndOfStrCompileRegex StartOfStr StartOfStr(CompileRegex cst regex) => CompileRegex (Optional cst) (Alt regex Nil)(CompileRegex cst regex) => CompileRegex (OneOrMore cst) (Cat regex (Many regex))(CompileRegex cst regex) => CompileRegex (Many cst) (Many regex)(CompileRegex cst regex) => CompileRegex (Group cst) regex(CompileRegex cst regex) => CompileRegex (Cat cst Nil) regex(CompileRegex cst regex) => CompileRegex (Cat Nil cst) regex(CompileRegex cst1 regex1, CompileRegex cst2 regex2) => CompileRegex (Cat cst1 cst2) (Cat regex1 regex2)(CompileRegex cst1 regex1, CompileRegex cst2 regex2) => CompileRegex (Alt cst1 cst2) (Alt regex1 regex2)(Fail ErrorUnexpected) => CompileRegex cst regex
#CompileCharClass Source
class CompileCharClass :: CharClass -> Boolean -> Regex -> Constraintclass CompileCharClass (charClass :: CharClass) (positive :: Boolean) (regex :: Regex) | charClass positive -> regex
Instances
(CompileCharClassGo charClass "" chars) => CompileCharClass charClass True (Lits chars)(CompileCharClassGo charClass "" chars) => CompileCharClass charClass False (NotLits chars)
#CompileCharClassGo Source
class CompileCharClassGo :: CharClass -> Symbol -> Symbol -> Constraintclass CompileCharClassGo (charClass :: CharClass) (charsFrom :: Symbol) (charsTo :: Symbol) | charClass charsFrom -> charsTo
Instances
CompileCharClassGo CharClassNil chars chars(CompileCharClassGo charClass chars' charsTo, Append chars char chars') => CompileCharClassGo (CharClassLit (UnsafeMkChar char) charClass) chars charsTo(AsciiCode from charFrom, AsciiCode to charTo, GetCharRange from to chars', Append chars chars' chars'', CompileCharClassGo charClass chars'' charsTo) => CompileCharClassGo (CharClassRange (UnsafeMkChar charFrom) (UnsafeMkChar charTo) charClass) chars charsTo
#GetCharRange Source
class GetCharRange :: Int -> Int -> Symbol -> Constraintclass GetCharRange (start :: Int) (end :: Int) (chars :: Symbol) | start end -> chars
Instances
(GetCharRangeGuard start end chars) => GetCharRange start end chars
#GetCharRangeGuard Source
class GetCharRangeGuard :: Int -> Int -> Symbol -> Constraintclass GetCharRangeGuard (start :: Int) (end :: Int) (chars :: Symbol) | start end -> chars
Instances
(Compare start end result, GetCharRangeGuardResult result start end chars) => GetCharRangeGuard start end chars
#GetCharRangeGuardResult Source
class GetCharRangeGuardResult :: Ordering -> Int -> Int -> Symbol -> Constraintclass GetCharRangeGuardResult (result :: Ordering) (start :: Int) (end :: Int) (chars :: Symbol) | result start end -> chars
Instances
(Fail ErrorRange) => GetCharRangeGuardResult GT start end charsIn(GetCharRangeGo start end "" chars) => GetCharRangeGuardResult result start end chars
#GetCharRangeGo Source
class GetCharRangeGo :: Int -> Int -> Symbol -> Symbol -> Constraintclass GetCharRangeGo (start :: Int) (end :: Int) (charsIn :: Symbol) (chars :: Symbol) | start end charsIn -> chars
Instances
(AsciiCode start char, Append char charsIn chars) => GetCharRangeGo start start charsIn chars(AsciiCode start char, GetCharRangeGo start' end charsIn' chars, Append char charsIn charsIn', Add start 1 start') => GetCharRangeGo start end charsIn chars