New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ltac2: importing a mutable definition does not undo its mutations #18713
Ltac2: importing a mutable definition does not undo its mutations #18713
Conversation
014ceb1
to
e75158b
Compare
@coqbot run full ci |
Are we sure this is the right semantics? It seems to me that seeing toplevel commands like |
Ocaml module initialization would be Require time not Import. |
That's why I put it in quotes, I agree the analogy is not perfect. |
2a26276
to
471d430
Compare
@coqbot run full ci |
|
||
Import Change1 Change1. | ||
|
||
(* Import doesn't deduplicate / assume idempotence (may change in the future?) *) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-idempotence of import looks fine to me, both in general and for this particular command. The one thing we care about is idempotence of require.
@SkySkimmer refman not happy |
471d430
to
5b53b64
Compare
doc/changelog/06-Ltac2-language/18713-ltac2-original-redef-no-import.rst
Outdated
Show resolved
Hide resolved
cf coq#10556 The previous behaviour can be gotten by doing eg ~~~coq (* auxiliary definition to avoid repeating it, if it's a simple expression it can also be inlined *) Ltac2 original_def := ... Ltac2 mutable the_def := original_def. Ltac2 Set the_def := original_def. ~~~ instead of `Ltac2 mutable the_def := ...`.
This exposes some complex behaviour around repeated imports when using `Set as`.
5b53b64
to
5dea992
Compare
@coqbot run full ci |
I don't have a very strong opinion either. What would be most intuitive to me would be to perform the update at |
That's what ltac1 does. |
Let's merge then @coqbot merge now |
@ppedrot: You cannot merge this PR because:
|
@coqbot merge now |
cf #10556
The previous behaviour can be gotten by doing eg
instead of
Ltac2 mutable the_def := ...
.Also add test for Ltac2 mutable definitions vs Import/Export.
This exposes some complex behaviour around repeated imports when using
Set as
.