Recall that
def typeSpec := leading_parser " : " >> termParser
def optType : Parser := optional typeSpec
Equations
- Lean.Elab.Term.expandOptType ref optType = if Lean.Syntax.isNone optType = true then Lean.mkHole ref else optType[0][1]
Helper function for expandEqnsIntoMatch
Equations
- Lean.Elab.Term.getMatchAltsNumPatterns matchAlts = let alt0 := matchAlts[0][0]; let pats := Lean.Syntax.getSepArgs alt0[1][0]; Array.size pats
def
Lean.Elab.Term.expandMatchAlt
(stx : Lean.TSyntax (Lean.Name.mkStr4 "Lean" "Parser" "Term" "matchAlt"))
:
Lean.MacroM (Array (Lean.TSyntax (Lean.Name.mkStr4 "Lean" "Parser" "Term" "matchAlt")))
Expand a match alternative such as | 0 | 1 => rhs
to an array containing | 0 => rhs
and | 1 => rhs
.
Equations
- One or more equations did not get rendered due to their size.
def
Lean.Elab.Term.shouldExpandMatchAlt :
Lean.TSyntax (Lean.Name.mkStr4 "Lean" "Parser" "Term" "matchAlt") → Bool
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.