fix: preserve tag
This commit is contained in:
parent
09f504f376
commit
9abb749663
1 changed files with 2 additions and 1 deletions
|
|
@ -21,9 +21,10 @@ private def getVarName (stx : Syntax) : Name :=
|
|||
(stx.getIdAt 4).eraseMacroScopes
|
||||
|
||||
private def evalGeneralizeFinalize (mvarId : MVarId) (e : Expr) (target : Expr) : MetaM (List MVarId) := do
|
||||
tag ← Meta.getMVarTag mvarId;
|
||||
eType ← Meta.inferType e;
|
||||
u ← Meta.getLevel eType;
|
||||
mvar' ← Meta.mkFreshExprSyntheticOpaqueMVar target;
|
||||
mvar' ← Meta.mkFreshExprSyntheticOpaqueMVar target tag;
|
||||
let rfl := mkApp2 (Lean.mkConst `Eq.refl [u]) eType e;
|
||||
let val := mkApp2 mvar' e rfl;
|
||||
Meta.assignExprMVar mvarId val;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue