lean4-htt/tests/lean/run/quote1.lean
2017-05-15 09:41:31 -07:00

16 lines
315 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 ``has_add.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