feat: add calc tactic macro

This commit is contained in:
Leonardo de Moura 2021-08-30 09:33:32 -07:00
parent ce47000e33
commit f4c72025ee

View file

@ -101,6 +101,8 @@ macro_rules
| `(calc $p:term := $h:term) => `(show $p from $h)
| `(calc $p:term := $h:term $rest:calcStep*) => ``(trans (show $p from $h) (calc $rest:calcStep*))
macro "calc " steps:withPosition(calcStep+) : tactic => `(exact calc $(steps.getArgs)*)
@[appUnexpander Unit.unit] def unexpandUnit : Lean.PrettyPrinter.Unexpander
| `($(_)) => `(())
| _ => throw ()