fix: let_fun with patterns
This commit is contained in:
parent
48bffedc74
commit
73b7a754ee
1 changed files with 3 additions and 3 deletions
|
|
@ -607,11 +607,11 @@ def elabLetDeclCore (stx : Syntax) (expectedType? : Option Expr) (useLetExpr : B
|
|||
let type := expandOptType stx optType
|
||||
let val := letDecl[4]
|
||||
let stxNew ← `(let x : $type := $val; match x with | $pat => $body)
|
||||
let stxNew := match useLetExpr, elabBodyFirst with
|
||||
let stxNew := match useLetExpr, elabBodyFirst with
|
||||
| true, false => stxNew
|
||||
| true, true => stxNew.setKind `Lean.Parser.Term.«let_delayed»
|
||||
| false, true => stxNew.setKind `Lean.Parser.Term.«let_fun»
|
||||
| false, false => unreachable!
|
||||
| false, false => stxNew.setKind `Lean.Parser.Term.«let_fun»
|
||||
| false, true => unreachable!
|
||||
withMacroExpansion stx stxNew <| elabTerm stxNew expectedType?
|
||||
else if letDecl.getKind == `Lean.Parser.Term.letEqnsDecl then
|
||||
let letDeclIdNew ← liftMacroM <| expandLetEqnsDecl letDecl
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue