fixes #3770 Also start `rfl` with a `fail` message that is hopefully more helpful than what we get now (see updated test output). This would be a cheaper way to address #3302 without changing the implementation of rfl (as tried in #3714).
23 lines
568 B
Text
23 lines
568 B
Text
macro "foo" : tactic => `(tactic|fail "first")
|
|
macro_rules | `(tactic|foo) => `(tactic|exact 1)
|
|
macro_rules | `(tactic|foo) => `(tactic|fail "middle")
|
|
macro_rules | `(tactic|foo) => `(tactic|exact 2)
|
|
macro_rules | `(tactic|foo) => `(tactic|fail "last")
|
|
|
|
def what_is_foo : Nat := by foo
|
|
|
|
/-- info: 2 -/
|
|
#guard_msgs in
|
|
#eval what_is_foo
|
|
|
|
|
|
macro "bar" : tactic => `(tactic|fail "first")
|
|
macro_rules | `(tactic|bar) => `(tactic|fail "middle")
|
|
macro_rules | `(tactic|bar) => `(tactic|fail "last")
|
|
|
|
/--
|
|
error: first
|
|
⊢ Nat
|
|
-/
|
|
#guard_msgs in
|
|
def what_is_bar : Nat := by bar
|