From e0e5c9ec681d0423a12a0c0278fef38cd8c5af80 Mon Sep 17 00:00:00 2001 From: Leni Aniva Date: Tue, 10 Dec 2024 23:51:47 -0800 Subject: [PATCH] chore: Code cleanup --- Pantograph/Goal.lean | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Pantograph/Goal.lean b/Pantograph/Goal.lean index 3a6e97a..7a09435 100644 --- a/Pantograph/Goal.lean +++ b/Pantograph/Goal.lean @@ -186,8 +186,7 @@ private def collectAllErroredMVars (src : MVarId) : Elab.TermElabM (List MVarId) let descendants ← Meta.getMVars $ ← instantiateMVars (.mvar src) let mut alreadyVisited : MVarIdSet := {} let mut result : MVarIdSet := {} - for mvarErrorInfo in (← get).mvarErrorInfos do - let mvarId := mvarErrorInfo.mvarId + for { mvarId, .. } in (← get).mvarErrorInfos do unless alreadyVisited.contains mvarId do alreadyVisited := alreadyVisited.insert mvarId /- The metavariable `mvarErrorInfo.mvarId` may have been assigned or @@ -196,10 +195,6 @@ private def collectAllErroredMVars (src : MVarId) : Elab.TermElabM (List MVarId) if mvarDeps.any descendants.contains then do result := result.insert mvarId return result.toList - --(← getThe Elab.Term.State).mvarErrorInfos - -- |>.map (·.mvarId) - -- |>.filterM λ mvarId => - -- return descendants.contains mvarId ∧ !(← mvarId.isAssignedOrDelayedAssigned) private def mergeMVarLists (li1 li2 : List MVarId) : List MVarId := let li2' := li2.filter (¬ li1.contains ·)