feat: show proof state/unclosed goal message on empty tactic sequences
closes #361
This commit is contained in:
parent
9291f59c8f
commit
ccddd0d932
3 changed files with 8 additions and 1 deletions
|
|
@ -175,7 +175,7 @@ mutual
|
|||
expandTacticMacroFns stx (macroAttribute.getEntries (← getEnv) stx.getKind)
|
||||
|
||||
partial def evalTacticAux (stx : Syntax) : TacticM Unit :=
|
||||
withRef stx $ withIncRecDepth $ withFreshMacroScope $ match stx with
|
||||
withRef stx <| withIncRecDepth <| withFreshMacroScope $ match stx with
|
||||
| Syntax.node _ k args =>
|
||||
if k == nullKind then
|
||||
-- Macro writers create a sequence of tactics `t₁ ... tₙ` using `mkNullNode #[t₁, ..., tₙ]`
|
||||
|
|
@ -186,6 +186,7 @@ mutual
|
|||
match tacticElabAttribute.getEntries (← getEnv) stx.getKind with
|
||||
| [] => expandTacticMacro stx
|
||||
| evalFns => evalTacticUsing s stx evalFns
|
||||
| Syntax.missing => pure ()
|
||||
| _ => throwError m!"unexpected tactic{indentD stx}"
|
||||
|
||||
partial def evalTactic (stx : Syntax) : TacticM Unit :=
|
||||
|
|
|
|||
5
tests/361.lean
Normal file
5
tests/361.lean
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
theorem ex1 (p q r : Prop) (h1 : p ∨ q) (h2 : p → q) : q := by
|
||||
|
||||
theorem ex2 (p q r : Prop) (h1 : p ∨ q) (h2 : p → q) : q := by
|
||||
cases h1
|
||||
case inl =>
|
||||
1
tests/lean/361.lean.expected.out
Normal file
1
tests/lean/361.lean.expected.out
Normal file
|
|
@ -0,0 +1 @@
|
|||
file '361.lean' not found
|
||||
Loading…
Add table
Reference in a new issue