Match Notation #
Returns whether the value matches the pattern.
Equations
Instances For
Abstract Patterns #
A pattern. Matches some subset of the values of a type. May also include a declarative description.
- filter : α → Bool
Returns whether the value matches the pattern.
- name : Lean.Name
An optional name for the filter.
- descr? : Option (PatternDescr α β)
A optional declarative description of the filter.
Instances For
Equations
An abstract declarative pattern.
Augments another pattern description β
with logical connectives.
- not
{α : Type u}
{β : Type v}
(p : Pattern α β)
: PatternDescr α β
Matches a value that does not satisfy the pattern.
- all
{α : Type u}
{β : Type v}
(ps : Array (Pattern α β))
: PatternDescr α β
Matches a value that satisfies every pattern. Short-circuits.
- any
{α : Type u}
{β : Type v}
(ps : Array (Pattern α β))
: PatternDescr α β
Matches a value that satisfies any one of the patterns. Short-circuits.
- coe
{α : Type u}
{β : Type v}
(p : β)
: PatternDescr α β
Matches a value that satisfies the underlying pattern description.
Instances For
Equations
Returns whether the value matches the pattern.
Equations
Instances For
Equations
Matches a value that satisfies an arbitrary predicate
(optionally identified by a Name
).
Equations
Instances For
Matches a string that satisfies the declarative pattern.
(optionally identified by a Name
).
Equations
Instances For
Equations
Matches nothing.
Equations
Instances For
Matches nothing.
Equations
Instances For
Equations
Equations
Matches everything.
Equations
Instances For
Matches everything.
Equations
Instances For
String Patterns #
A declarative String
pattern. Matches some subset of strings.
- mem
(xs : Array String)
: StrPatDescr
Matches a string that is a member of the array
- startsWith
(affix : String)
: StrPatDescr
Matches a string that starts with this prefix.
- endsWith
(affix : String)
: StrPatDescr
Matches a string that ends with this suffix.
Instances For
Returns whether the string matches the pattern.
Equations
Instances For
Matches nothing.
Equations
Instances For
Matches a value that satisfies an arbitrary predicate
(optionally identified by a Name
).
Equations
Instances For
Matches a string that is a member of the array
Equations
Instances For
Matches a string that starts with this prefix.
Equations
Instances For
Matches a string that ends with this suffix.
Equations
Instances For
Matches a string that is equal to this one.
Equations
Instances For
Matches a string that is a member of the array
Equations
Instances For
File Path Patterns #
A declarative FilePath
pattern. Matches some subset of file paths.
- path
(p : StrPat)
: PathPatDescr
Matches a file path whose normalized string representation satisfies the pattern.
- extension
(p : StrPat)
: PathPatDescr
Matches a file path whose extension satisfies the pattern.
- fileName
(p : StrPat)
: PathPatDescr
Matches a file path whose name satisfies the pattern.
Instances For
Matches a file path that is equal to this one (when both are normalized).
Equations
Instances For
Returns whether the string matches the pattern.
Equations
Instances For
Equations
A FilePath
pattern. Matches some subset of file paths.
Equations
Instances For
Matches a file path whose normalized string representation satisfies the pattern.
Equations
Instances For
Matches a file path whose extension satisfies the pattern.
Equations
Instances For
Matches a file path whose name satisfies the pattern.
Equations
Instances For
Version-specific Patterns #
Whether a string is "version-like".
That is, a v
followed by a digit.
Equations
Instances For
Matches a "version-like" string: a v
followed by a digit.
Equations
Instances For
Default string pattern for a Package's versionTags
.