-
Notifications
You must be signed in to change notification settings - Fork 249
Description
I hesitated a bit to mention this, because it is not a problem of Compcert, but the $ Notation in Clightdefs:
(
CompCert/exportclight/Clightdefs.v
Line 180 in 6106e04
| Notation "$ s" := (ltac:(ident_of_string s)) |
causes severe issues for me. It hides the trivial term anti quotation of Ltac2. I discussed this to quite some length with Pierre-Marie Pedrot, and there is no pleasant work around or way to fix this on the Ltac2 side, since injecting anti quotations into arbitrary Gallina terms is necessarily a bit low level. Essentially instead of the $x in:
Require compcert.exportclight.Clightdefs.
Require Import Ltac2.Ltac2.
Ltac2 test (a : constr) :=
match! a with
| ?x => constr:($x)
end.
I have to write something like ltac2:(rct x), where rct is a defined function producing a refine. This doesn't look that bad, but if I have to do this 10 times for a function with 10 arguments, the Ltac2 code gets hard to read and error prone. Furthermore this is less efficient at run time.
Since this notation does not seem to be widely used (CompCert compiles fine after removing it), I wonder if it could be removed or at least put into a separate module one can load as needed.