feat: add evalFailIfSuccess
This commit is contained in:
parent
679bdb5886
commit
9a38aca8ec
1 changed files with 9 additions and 0 deletions
|
|
@ -298,6 +298,15 @@ fun stx => evalChoiceAux stx.getArgs 0
|
|||
@[builtinTactic skip] def evalSkip : Tactic :=
|
||||
fun stx => pure ()
|
||||
|
||||
@[builtinTactic failIfSuccess] def evalFailIfSuccess : Tactic :=
|
||||
fun stx =>
|
||||
let tactic := stx.getArg 1;
|
||||
whenM
|
||||
(catch
|
||||
(do evalTactic tactic; pure true)
|
||||
(fun _ => pure false))
|
||||
(throwError stx ("tactic succeeded"))
|
||||
|
||||
@[builtinTactic traceState] def evalTraceState : Tactic :=
|
||||
fun stx => do
|
||||
gs ← getUnsolvedGoals;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue