feat: add tactic macro unhygienic <tactic-seq>
This commit is contained in:
parent
e56bf66d8d
commit
8917e08251
2 changed files with 7 additions and 0 deletions
|
|
@ -310,6 +310,8 @@ macro_rules | `(tactic| trivial) => `(tactic| contradiction)
|
|||
macro_rules | `(tactic| trivial) => `(tactic| apply True.intro)
|
||||
macro_rules | `(tactic| trivial) => `(tactic| apply And.intro <;> trivial)
|
||||
|
||||
macro "unhygienic " t:tacticSeq : tactic => `(set_option tactic.hygienic false in $t:tacticSeq)
|
||||
|
||||
end Tactic
|
||||
|
||||
namespace Attr
|
||||
|
|
|
|||
|
|
@ -45,3 +45,8 @@ example {p q : Prop} (h₁ : p → q) (h₂ : p ∨ q) : q := by
|
|||
match h₂ with
|
||||
| Or.inl _ => apply h₁; assumption
|
||||
| Or.inr h => exact h
|
||||
|
||||
example {p q : Prop} (h₁ : p → q) (h₂ : p ∨ q) : q := by unhygienic
|
||||
cases h₂
|
||||
{ apply h₁; exact h } -- hygiene is disabled
|
||||
exact h
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue