Module
TLDR.Matchers.Class
- Package
- purescript-tldr
- Repository
- mikesol/purescript-tldr
#ReplaceFailureWith Source
class ReplaceFailureWith match resI resO | match resI -> resOInstances
(ShowMatch match o) => ReplaceFailureWith match (Failure f) (Failure (SingleFailure (Beside (Text "Failed to match on matcher ") (Text o))))ReplaceFailureWith match (Success a b) (Success a b)
#MatchLiteral Source
class MatchLiteral :: Symbol -> Symbol -> Symbol -> Type -> Constraintclass MatchLiteral l h t res | l h t -> res
Instances
MatchLiteral l l t (Success l t)MatchLiteral l h t (Failure (SingleFailure (Beside (Text "Could not match ") (Beside (Text l) (Beside (Text " against ") (Text h))))))
#Match Source
class Match :: Symbol -> Type -> Type -> Constraintclass Match i m o | i m -> o
Instances
Match i Noop (Success "" i)Match "" EOF (Success "" "")Match "" (Many anything) (Success "" "")(ShowMatch m s) => Match "" m (Failure (SingleFailure (Beside (Text "Cannot match empty string against a matcher") (Text s))))(Cons h t i) => Match i Any (Success h t)(Cons h t i, Match09 h res', SimpleSubResult res' t Match09 res) => Match i Match09 res(Cons h t i, MatchAlpha h res', SimpleSubResult res' t MatchAlpha res) => Match i MatchAlpha res(Cons h t i, MatchAlphanumeric h res', SimpleSubResult res' t MatchAlphanumeric res) => Match i MatchAlphanumeric res(Cons h t i, MatchHex h res', SimpleSubResult res' t MatchHex res) => Match i MatchHex res(Cons h t i, Matchaz h res', SimpleSubResult res' t Matchaz res) => Match i Matchaz res(Cons h t i, Matchaz09 h res', SimpleSubResult res' t Matchaz09 res) => Match i Matchaz09 res(Cons h t i, MatchAZ h res', SimpleSubResult res' t MatchAZ res) => Match i MatchAZ res(Cons h t i, MatchAZ09 h res', SimpleSubResult res' t MatchAZ09 res) => Match i MatchAZ09 res(Cons h t i, MatchWhitespace h res', SimpleSubResult res' t MatchWhitespace res) => Match i MatchWhitespace res(Match i (And match match) res) => Match i (Match2 match) res(Match i match res', ContinueOnSuccessOrFailWith (Match2 match) res' (Match2 match) res) => Match i (Match3 match) res(Match i match res', ContinueOnSuccessOrFailWith (Match3 match) res' (Match2 match) res) => Match i (Match4 match) res(Match i match res', ContinueOnSuccessOrFailWith (Match4 match) res' (Match2 match) res) => Match i (Match5 match) res(Match i match res', ContinueOnSuccessOrFailWith (Match5 match) res' (Match2 match) res) => Match i (Match6 match) res(Match i match res', ContinueOnSuccessOrFailWith (Match6 match) res' (Match2 match) res) => Match i (Match7 match) res(Match i match res', ContinueOnSuccessOrFailWith (Match7 match) res' (Match2 match) res) => Match i (Match8 match) res(Match i match res', ContinueOnSuccessOrFailWith (Match8 match) res' (Match2 match) res) => Match i (Match9 match) res(Cons h t i, MatchLiteral l h t res) => Match i (Literal l) res(Match i match1 res', ContinueOnSuccessOrFailWith match2 res' (And match1 match2) res) => Match i (And match1 match2) res(Match i match1 res', StopOnSuccessOrContinue i match2 res' res'', ReplaceFailureWith (Or match1 match2) res'' res) => Match i (Or match1 match2) res(Match i match1 res', FailOnSuccessOrContinue i match2 res' res'', ReplaceFailureWith (Except match1 match2) res'' res) => Match i (Except match1 match2) res(ManyLoop i (Success "" i) match res', ReplaceFailureWith (Many match) res' res) => Match i (Many match) res(Match i (And match (Many match)) res', ReplaceFailureWith (Some match) res' res) => Match i (Some match) res
#SimpleSubResult Source
class SimpleSubResult :: Type -> Symbol -> Type -> Type -> Constraintclass SimpleSubResult i s m o | i s m -> o
Instances
SimpleSubResult (Success i s') s m (Success i s)(ShowMatch m o) => SimpleSubResult (Failure f) s m (Failure (SingleFailure (Beside (Text "Failed to match on matcher ") (Text o))))
#MergeMatch Source
class MergeMatch :: Type -> Symbol -> Type -> Type -> Constraintclass MergeMatch resI head failMatch resO | resI head failMatch -> resO
Instances
(ShowMatch failMatch o) => MergeMatch (Failure f) head failMatch (Failure (SingleFailure (Beside (Text "Failed to match on matcher ") (Text o))))(Append h head o) => MergeMatch (Success head tail) h failMatch (Success o tail)
#ContinueOnSuccessOrFailWith Source
class ContinueOnSuccessOrFailWith match inRes failMatch outRes | match inRes failMatch -> outResInstances
(ShowMatch failMatch o) => ContinueOnSuccessOrFailWith match (Failure fail) failMatch (Failure (SingleFailure (Beside (Text "Failed to match on matcher ") (Text o))))(Match tail match res, MergeMatch res head failMatch o) => ContinueOnSuccessOrFailWith match (Success head tail) failMatch o
#StopOnSuccessOrContinue Source
class StopOnSuccessOrContinue :: Symbol -> Type -> Type -> Type -> Constraintclass StopOnSuccessOrContinue s match inRes outRes | match inRes -> outRes
Instances
(Match s match res) => StopOnSuccessOrContinue s match (Failure fail) resStopOnSuccessOrContinue ignore match (Success a b) (Success a b)
#FailOnSuccessOrContinue Source
class FailOnSuccessOrContinue :: Symbol -> Type -> Type -> Type -> Constraintclass FailOnSuccessOrContinue s match inRes outRes | match inRes -> outRes
Instances
(Match s match res) => FailOnSuccessOrContinue s match (Failure fail) resFailOnSuccessOrContinue s match (Success a b) (Failure (SingleFailure (Beside (Text "Failed to match on matcher ") (Text s))))
- Modules
- TLDR.
Combinators - TLDR.
Combinators. Class - TLDR.
List - TLDR.
Matchers - TLDR.
Matchers. Class - TLDR.
Matchers. Match09 - TLDR.
Matchers. MatchAlpha - TLDR.
Matchers. MatchAlphanumeric - TLDR.
Matchers. MatchHex - TLDR.
Matchers. MatchLaz - TLDR.
Matchers. MatchLaz09 - TLDR.
Matchers. MatchUaz - TLDR.
Matchers. MatchUaz09 - TLDR.
Matchers. MatchWhitespace - TLDR.
Matchers. Show - TLDR.
Result - TLDR.
Sugar