Skip to content
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

[serapi] New command SaveDoc to save .vo files. #239

Merged
merged 1 commit into from
Apr 17, 2021
Merged

Conversation

ejgallego
Copy link
Owner

@ejgallego ejgallego commented Apr 17, 2021

We introduce a new commmand:

(SaveDoc opts)

to save .vo files from an interactive session. opts are optional,
and can be

  • (sid s): save the document at a specific sentence
  • (prefix_output_dir dir) add a prefix to the file.vo to be saved.

Note that Coq requires that the module name and the filename do match,
thus in order to use this command sertop must be called with the
--topfile file.v flag, otherwise CannotSaveVo will be raised.

Closes #128 closes #238

@ejgallego
Copy link
Owner Author

Note the experimental character of this PR as TTBOMK the corresponding upstream path for saving interactive files has not been tested. It seems to work OK in my own testing tho, .vo files generated by coqc and (SaveDoc ...) seem the same [modulo one single flag (2 bytes) which I didn't bother to explore]

@ejgallego ejgallego force-pushed the v8.13 save_vo branch 2 times, most recently from b2834b0 to 7d4cb6b Compare April 17, 2021 20:13
@ejgallego ejgallego self-assigned this Apr 17, 2021
@ejgallego
Copy link
Owner Author

@JasonGross let me know if you would like to test / review this, otherwise I will proceed to merge.

We introduce a new commmand:
```lisp
(SaveDoc opts)
```
to save .vo files from an interactive session. `opts` are optional,
and can be

- `(sid s)`: save the document at a specific sentence
- `(prefix_output_dir dir)` add a prefix to the `file.vo` to be saved.

Note that Coq requires that the module name and the filename do match,
thus in order to use this command `sertop` must be called with the
`--topfile file.v` flag, otherwise `CannotSaveVo` will be raised.

Closes #128 #238
@JasonGross
Copy link
Collaborator

I would suggest merging, as my only current plan for using this feature is via @cpitclaudel 's Alectryon

@ejgallego ejgallego merged commit 5c2042f into v8.13 Apr 17, 2021
@ejgallego ejgallego deleted the v8.13 save_vo branch April 17, 2021 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature request] Ability to save .vo file from interactive session Saving Documents in SerAPI
2 participants