feat: Add library bindings for calc

This commit is contained in:
Leni Aniva 2024-04-11 15:04:36 -07:00
parent 663651b10e
commit 222cb035d1
Signed by: aniva
GPG Key ID: 4D9B1C8D10EA4C50
1 changed files with 4 additions and 0 deletions

View File

@ -178,6 +178,10 @@ def goalConv (state: GoalState) (goalId: Nat): Lean.CoreM TacticResult :=
def goalConvExit (state: GoalState): Lean.CoreM TacticResult := def goalConvExit (state: GoalState): Lean.CoreM TacticResult :=
runTermElabM <| state.convExit runTermElabM <| state.convExit
@[export pantograph_goal_calc_m]
def goalCalc (state: GoalState) (goalId: Nat) (pred: String): Lean.CoreM TacticResult :=
runTermElabM <| state.tryCalc goalId pred
@[export pantograph_goal_focus] @[export pantograph_goal_focus]
def goalFocus (state: GoalState) (goalId: Nat): Option GoalState := def goalFocus (state: GoalState) (goalId: Nat): Option GoalState :=
state.focus goalId state.focus goalId