lean4-htt/tests/elab_fail/macroStack.lean
Sebastian Graf 40e8f4c5fb
chore: turn on new do elaborator in Core (#12656)
This PR turns on the new `do` elaborator in Init, Lean, Std, Lake and
the testsuite.

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 12:38:33 +00:00

18 lines
343 B
Text

set_option backward.do.legacy false
--
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