lean4-htt/tests/lean/run/quote1.lean
2017-03-09 18:41:19 -08:00

16 lines
304 B
Text

open tactic list
meta definition foo (a : pexpr) : pexpr :=
`(%%a + %%a + %%a + b)
example (a b : nat) : a = a :=
by do
a ← get_local `a,
t1 ← mk_app `add [a, a],
t2 ← to_expr (foo (to_pexpr t1)),
trace t2,
r ← mk_app (`eq.refl) [a],
exact r
private def f := unit
#check ``f