chore: Code cleanup

This commit is contained in:
Leni Aniva 2024-12-10 23:51:47 -08:00
parent 755ba13c1b
commit e0e5c9ec68
Signed by: aniva
GPG Key ID: 4D9B1C8D10EA4C50
1 changed files with 1 additions and 6 deletions

View File

@ -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 ·)