Skip to content

Commit 2f02cad

Browse files
committed
fix changes to Lean/Elab/Binders after rebase
1 parent e4c4576 commit 2f02cad

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/Lean/Elab/Binders.lean

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -799,18 +799,17 @@ def elabLetDeclAux (id : Syntax) (binders : Array Syntax) (typeStx : Syntax) (va
799799
mkLetFVars #[x] body (usedLetOnly := config.usedOnly) (generalizeNondepLet := false)
800800
| some h =>
801801
let hTy ← mkEq x val
802-
let pf ← mkEqRefl x
803-
withLetDecl h.getId hTy pf (nondep := true) fun h' => do
802+
withLetDecl h.getId hTy (← mkEqRefl x) (nondep := true) fun h' => do
804803
addLocalVarInfo h h'
805804
let body ← elabBody
806805
if config.zeta then
807-
pure <| (← body.abstractM #[x, h']).instantiateRev #[val, pf]
806+
pure <| (← body.abstractM #[x, h']).instantiateRev #[val, ← mkEqRefl val]
808807
else if config.nondep then
809808
-- TODO(kmill): Think more about how to encode this case.
810809
-- Currently we produce `(fun (x : α) (h : x = val) => b) val rfl`.
811810
-- N.B. the nondep lets become lambdas here.
812811
let f ← mkLambdaFVars #[x, h'] body
813-
return mkApp2 f val pf
812+
return mkApp2 f val (← mkEqRefl val)
814813
else
815814
mkLetFVars #[x, h'] body (usedLetOnly := config.usedOnly) (generalizeNondepLet := false)
816815
if config.postponeValue then

src/Lean/Meta/Tactic/Lets.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ partial def extractCore (fvars : List Expr) (e : Expr) (topLevel : Bool := false
224224
match e with
225225
| .bvar .. | .fvar .. | .mvar .. | .sort .. | .const .. | .lit .. => unreachable!
226226
| .mdata _ e' => return e.updateMData! (← extractCore fvars e' (topLevel := topLevel))
227-
| .letE n t v b nondep => extractLetLike !nondep n t v b (fun t v b => pure <| e.updateLetE! t v b) (topLevel := topLevel)
227+
| .letE n t v b nondep => extractLetLike (!nondep) n t v b (fun t v b => pure <| e.updateLetE! t v b) (topLevel := topLevel)
228228
| .app .. =>
229229
if e.isLetFun then
230230
extractLetFun e (topLevel := topLevel)

0 commit comments

Comments
 (0)