refactor: Remove old `visibleFVars` interface

This commit is contained in:
Leni Aniva 2024-08-02 19:53:19 -07:00
parent 651afa75f4
commit 2c08ef1e23
Signed by: aniva
GPG Key ID: 4D9B1C8D10EA4C50
1 changed files with 0 additions and 9 deletions

View File

@ -69,15 +69,6 @@ protected def GoalState.metaContextOfGoal (state: GoalState) (mvarId: MVarId): O
protected def GoalState.metaState (state: GoalState): Meta.State :=
state.savedState.term.meta.meta
-- Get the list of visible free variables from a goal
@[export pantograph_goal_state_visible_fvars]
protected def GoalState.visibleFVars (state: GoalState) (mvarId: MVarId): Option (Array FVarId) := do
let mvarDecl ← state.mctx.findDecl? mvarId
let lctx := mvarDecl.lctx
return lctx.decls.foldl (init := #[]) fun r decl? => match decl? with
| some decl => if decl.isAuxDecl decl.isImplementationDetail then r else r.push decl.fvarId
| none => r
protected def GoalState.withContext (state: GoalState) (mvarId: MVarId) (m: MetaM α): MetaM α := do
mvarId.withContext m |>.run' (← read) state.metaState