Zulip Chat Archive

Stream: metaprogramming / tactics

Topic: How does texpr parse numerals?


Bhavik Mehta (Jan 16 2022 at 06:47):

section

open tactic
open interactive

meta def my_refine (q : parse types.texpr) : tactic unit :=
tactic.refine q

end

example :  :=
begin
  refine 1,
end

example :  :=
begin
  my_refine 1,
end

I'm not sure why the first example succeeds but the second doesn't!

Mario Carneiro (Jan 16 2022 at 07:27):

you didn't put my_refine in the tactic.interactive namespace, so it's parsing my_refine 1 as an application


Last updated: Dec 20 2023 at 11:08 UTC