lean4-htt/tests/lean/macroStack.lean
Leonardo de Moura ffefd8db36 chore: remove weird syntax sugar from macro command
Before this commit,
```
macro term x:term : term => `($x)
```
would generate the notation
```
syntax "term" term : term
```
2020-12-10 08:09:47 -08:00

17 lines
307 B
Text

--
def f1 :=
if h:x then 1 else 0
set_option pp.macroStack true
def f2 :=
if h:(x > 0) then 1 else 0
def x := <- get
macro "foo!" x:term:max : term => `(let x := "hello"; $x + x)
macro "bla!" x:term:max : term => `(fun (x : Nat) => if foo! ($x + x) < 1 then true else false)
def f (x : Nat) :=
bla! x