Skip to content

Update documentation of coq.elpi.accumulate #811

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

Merged
merged 4 commits into from
Apr 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/rocq_elpi_builtins.ml
Original file line number Diff line number Diff line change
@@ -4122,15 +4122,16 @@ coq.elpi.accumulate S N C :- coq.elpi.accumulate-clauses S N [C].
In(id, "DbName",
In(B.list Rocq_elpi_builtins_synterp.clause, "Clauses",
Full (global, {|
Declare that, once the program is over, the given clauses has to be
added to the given db (see Elpi Db).
Declare that the given clauses have to be added to the given db (see Elpi Db).
Clauses usually belong to Coq modules: the Scope argument lets one
select which module:
- execution site (default) is the module in which the pogram is
invoked
- execution site (default) is the module in which the program is
invoked, the clauses will be accumulated when the execution of the program ends
- current is the module currently being constructed (see
begin/end-module)
- library is the current file (the module that is named after the file)
begin/end-module), the clauses will be accumulated when the execution of the program ends
or the start of another program (whichever comes first)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
or the start of another program (whichever comes first)

I'm not sure this is the case, did you test it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what I seem to observe when I accumulate the coercion and it is used in the subsequent elaboration.

- library is the current file (the module that is named after the file),
the clauses will be accumulated when the execution of the program ends
The clauses are visible as soon as the enclosing module is Imported.
A clause that mentions a section variable is automatically discarded
at the end of the section.