-
Notifications
You must be signed in to change notification settings - Fork 474
Adding extracted_files field to rocq.extraction stanza
#13997
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
Changes from 3 commits
2f54af1
f4150d8
d7d8744
d0beeb6
fd2f0c8
6f66894
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -374,6 +374,8 @@ The supported Rocq language versions (not the version of Rocq) are: | |
| + ``(mode native)`` is not allowed anymore. It is the default if Rocq was configured with native compute enabled. | ||
| + ``COQPATH`` is not recognized anymore, use ``ROCQPATH``. | ||
| - ``0.12``: Support for output tests. | ||
| - ``0.13``: ``rocq.extraction`` now uses ``extracted_files`` instead of | ||
| ``extracted_modules``, supporting extraction to languages other than OCaml. | ||
|
|
||
| .. _rocq-lang-1.0: | ||
|
|
||
|
|
@@ -391,21 +393,41 @@ unchanged or minimally modified. | |
| rocq.extraction | ||
| --------------- | ||
|
|
||
| Rocq may be instructed to *extract* OCaml sources as part of the compilation | ||
| Rocq may be instructed to *extract* sources as part of the compilation | ||
| process by using the ``rocq.extraction`` stanza: | ||
|
|
||
| For ``(rocq 0.12)`` and below: | ||
|
|
||
| .. code:: dune | ||
|
|
||
| (rocq.extraction | ||
| (prelude <name>) | ||
| (extracted_modules <names>) | ||
| <optional-fields>) | ||
|
|
||
| For ``(rocq 0.13)`` and above: | ||
|
|
||
| .. code:: dune | ||
|
|
||
| (rocq.extraction | ||
| (prelude <name>) | ||
| (extracted_files <filenames>) | ||
| <optional-fields>) | ||
|
|
||
| - ``(prelude <name>)`` refers to the Rocq source that contains the extraction | ||
| commands. | ||
|
|
||
| - ``(extracted_modules <names>)`` is an exhaustive list of OCaml modules | ||
| extracted. | ||
| - ``(extracted_modules <names>)`` specifies the OCaml modules to be extracted. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would put the information about upgrading in this section, and move this section below. |
||
| For each module name, Dune expects both a ``.ml`` and ``.mli`` file to be | ||
| produced. Available in ``(rocq 0.12)`` and below; replaced by | ||
| ``extracted_files`` in ``(rocq 0.13)``. | ||
|
|
||
| - ``(extracted_files <filenames>)`` is a list of filenames (with extensions) | ||
| that will be produced by the extraction. This allows extraction to languages | ||
| other than OCaml, such as Haskell (``.hs``) or Scheme (``.scm``). Available | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have a
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I couldn't exactly find a
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, my memory this morning was very poor, its |
||
| since ``(rocq 0.13)``. Users upgrading from ``0.12`` should replace | ||
| ``(extracted_modules M1 ... Mn)`` with ``(extracted_files M1.ml M1.mli ... Mn.ml | ||
| Mn.mli)``. | ||
|
|
||
| - ``<optional-fields>`` are ``flags``, ``stdlib``, ``theories``, and | ||
| ``plugins``. All of these fields have the same meaning as in the | ||
|
|
||
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.
Let's only keep the new version otherwise it risks being confusing.
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.
i.e. don't repeat the stanza, just show the new version.
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.
I moved info about
extracted_modulesinto anote, because it felt a bit orphaned now