lean4-htt/tests/lean/unknownTactic.lean
Leonardo de Moura 0a56057db1 feat: better error message for "unknown" tactic
@Kha The hack I posted at Zulip didn't really work
```
macro x:ident : tactic => throw $ Lean.Macro.Exception.error x s!"unknown tactic '{x.getId}'"
```

For example, we would still get a weird error message at
```
theorem ex3 (x : Nat) : x = x → x = x :=
  have x = x by foo (aaa bbb) -- The error would be at `bbb`
  fun h => h
```
There were other minor issues that could be fixed, but this one was bad.
2020-10-30 14:58:17 -07:00

15 lines
261 B
Text

theorem ex1 (x : Nat) : x = x → x = x := by
intro
aexact (rfl)
#print "---"
theorem ex2 (x : Nat) : x = x → x = x :=
have x = x by foo
fun h => h
#print "---"
theorem ex3 (x : Nat) : x = x → x = x :=
have x = x by foo (aaa bbb)
fun h => h