Skip to content

Commit 41458a0

Browse files
committed
chore: add searchUsing
1 parent 5e3c330 commit 41458a0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Lean/Meta/Tactic/Grind/SearchM.lean

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,4 +219,14 @@ def nextGoal? : SearchM (Option Nat) := do
219219
return some choice.generation
220220
unreachable!
221221

222+
/--
223+
Execute `x` using the current goal as the starting goal.
224+
The state is not updated.
225+
-/
226+
def searchUsing (x : SearchM α) : GoalM α := do
227+
let goal ← get
228+
let goal := { goal with newFacts := {} }
229+
let (a, _) ← x.run goal
230+
return a
231+
222232
end Lean.Meta.Grind

0 commit comments

Comments
 (0)