Compare commits

...

1 Commits

Author SHA1 Message Date
Scott Morrison
cbc54f6643 chore: default for librarySearch tactic argument 2024-02-25 18:16:35 +11:00
2 changed files with 3 additions and 3 deletions

View File

@@ -67,8 +67,7 @@ def elabExact?Term : TermElab := fun stx expectedType? => do
let goal mkFreshExprMVar expectedType
let (_, introdGoal) goal.mvarId!.intros
introdGoal.withContext do
let tactic := fun exfalso g => solveByElim [] (maxDepth := 6) exfalso g
if let some suggestions librarySearch introdGoal tactic then
if let some suggestions librarySearch introdGoal then
reportOutOfHeartbeats `library_search stx
for suggestion in suggestions do
withMCtx suggestion.2 do

View File

@@ -386,7 +386,8 @@ unless the goal was completely solved.)
this is not currently tracked.)
-/
def librarySearch (goal : MVarId)
(tactic : Bool List MVarId MetaM (List MVarId))
(tactic : Bool List MVarId MetaM (List MVarId) :=
fun initial g => solveByElim [] (maxDepth := 6) (exfalso := initial) g)
(allowFailure : MVarId MetaM Bool := fun _ => pure true)
(leavePercentHeartbeats : Nat := 10) :
MetaM (Option (Array (List MVarId × MetavarContext))) := do