lean4-htt/tests/lean/macroStack.lean
Leonardo de Moura bbc1f4d461 fix: throwAppTypeMismatch should be polymorphic
We use it from `TermElabM` and `MetaM`, and they have different
`TermElabM` implementations.
2020-09-22 09:35:59 -07:00

17 lines
313 B
Text

new_frontend
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