feat: Export fvar names function
This commit is contained in:
parent
caa463f410
commit
abef7a6f0d
|
@ -69,6 +69,11 @@ protected def GoalState.metaContextOfGoal (state: GoalState) (mvarId: MVarId): O
|
||||||
protected def GoalState.metaState (state: GoalState): Meta.State :=
|
protected def GoalState.metaState (state: GoalState): Meta.State :=
|
||||||
state.savedState.term.meta.meta
|
state.savedState.term.meta.meta
|
||||||
|
|
||||||
|
@[export pantograph_goal_state_fvar_names_of_goal]
|
||||||
|
protected def GoalState.fvarNamesOfGoal (state: GoalState) (mvarId: MVarId): Option (Array FVarId) := do
|
||||||
|
let mvarDecl ← state.mctx.findDecl? mvarId
|
||||||
|
return mvarDecl.lctx.getFVarIds
|
||||||
|
|
||||||
protected def GoalState.withContext (state: GoalState) (mvarId: MVarId) (m: MetaM α): MetaM α := do
|
protected def GoalState.withContext (state: GoalState) (mvarId: MVarId) (m: MetaM α): MetaM α := do
|
||||||
mvarId.withContext m |>.run' (← read) state.metaState
|
mvarId.withContext m |>.run' (← read) state.metaState
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue