Skip to content

Support for Rocq/Coq 9.0 #547

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 9 commits into from
May 5, 2025
Merged

Support for Rocq/Coq 9.0 #547

merged 9 commits into from
May 5, 2025

Conversation

xavierleroy
Copy link
Contributor

This PR adds basic support for the Rocq prover version 9.0.

We still use the coqc, coqtop, etc, command-line tools, relying on the Coq 9.0 compatibility layer.

The main change is the explicit prefixing of imports from the standard library with From Coq. At some later point this will become From Stdlib, but right now this would break compatibility with Coq 8.

@xavierleroy xavierleroy force-pushed the coq-9.0 branch 2 times, most recently from 4c522af to 9a18217 Compare March 21, 2025 16:15
@xavierleroy
Copy link
Contributor Author

CI action latest not yet updated to use 9.0, see rocq-community/docker-rocq#10 .

@xavierleroy
Copy link
Contributor Author

The docker situation was resolved (thanks @erikmd !), so the latest CI action now uses Coq/Rocq 9.0.

Works around a strange link-time inconsistency in some cases.
For compatibility with Rocq 9.0.
New Flocq require >= 8.15.
Coq 9.0 is supported.
Warn if Rocq is installed but not Coq.
Coq is now able to extract empty Coq types to empty OCaml types.
This triggers a "unused-case" warning on pattern-matches involving the
`BI_platform` constructor of argument `platform_builtin`,
since the type `platform_builtin` is empty for RISC-V.

This commit simply turns warning "unused-case" (56) off for extracted files.

Note that "unused-case" warning is triggered by pattern-matching cases
that are not reachable for reasons of types.  It concerns mainly GADTs.
The classic, non-type based "redundant-case" warning (11) is
still active.
Rocq 9.0 wants `From Stdlib`, but Coq 8 understands `From Coq`.
Changing `From Coq` to `From Stdlib` later will be easy.
@xavierleroy
Copy link
Contributor Author

All tests are positive, so let's merge.

@xavierleroy xavierleroy merged commit b41d5c1 into master May 5, 2025
13 checks passed
@xavierleroy xavierleroy deleted the coq-9.0 branch May 29, 2025 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant