feat: Allow primitive projections with postponed eta (no sort poly)#21438
feat: Allow primitive projections with postponed eta (no sort poly)#21438coqbot-app[bot] merged 4 commits intorocq-prover:masterfrom
Conversation
1c98298 to
190bfdd
Compare
|
@coqbot run full ci |
| assert (Result.is_ok @@ Option.get not_prim_or_has_eta); | ||
| PrimRecord { id = rid.(i); projections; relevances; tys; has_eta = Result.get_ok @@ Option.get not_prim_or_has_eta} | ||
| | None | Some (Error _) -> assert false | ||
| | Some Ok has_eta -> |
There was a problem hiding this comment.
The year is 2026 and I discover a new OCaml syntax. Since when is that pattern allowed without parentheses?
|
Some messages need a few tweaks, for instance: Set Primitive Projections.
Record T (A : SProp) : Type := {
p : A
}.
About T.gives |
0557dac to
82e6768
Compare
|
|
||
| Record noprojs := { y := 0 }. | ||
|
|
||
| Record norelevantprojs (A:SProp) := { z : A }. |
There was a problem hiding this comment.
Rather than removing the example, I think you should keep it and add an About command to witness the correct message here.
|
@coqbot run full ci |
refactor: Cleanup prim projection assertion and misc refactor: Remove MaybeEta
7e00cfe to
6b296f2
Compare
|
@coqbot run full ci |
|
Why is the CI broken now? |
Ah, wrong url for my metarocq repo... The lean one I don't know yet. |
|
Full CI from 2 weeks ago had the same lean importer error https://gitlab.inria.fr/coq/coq/-/jobs/6619036 |
| @@ -0,0 +1 @@ | |||
| overlay metarocq https://github.com/TDiazT/metarocq primitive-postponed-eta 21438 | |||
There was a problem hiding this comment.
| overlay metarocq https://github.com/TDiazT/metarocq primitive-postponed-eta 21438 | |
| overlay metarocq https://github.com/TDiazT/metacoq primitive-postponed-eta 21438 |
or rename your repo (renaming your repo will prevent such errors in the future)
6b296f2 to
9664efe
Compare
Yep, that seems to work. I am not really understanding what it is that this piece of code is doing though (in the importer). |
|
@coqbot run full ci |
Adapt to rocq-prover/rocq#21438 (Check for existing relevant field)
If not then it's a regular inductive, not fakerecord. |
|
@coqbot merge now |
|
@ppedrot: Please take care of the following overlays:
|
Adapt to rocq-prover/rocq#21438 (PrimRecord record type + has_eta)
This PR relaxes the constraints on defining records with primitive projections, namely for
TypeandProp, by postponing the check to conversion. Namely, it introduces a new argumenthas_etato decide whether to check or reject during conversion. This is a prelude to #21416.Type/Propwith fields only inSPropcan be defined and haveNoEta, thus fail conversion.swith fields only inSPropcan be defined and haveMaybeEta, but currently fail during conversion.swith fields in other sorts are allowed and haveMaybeEta.Associated RFC : rocq-prover/rfcs#111.
Examples
Test cases added in success/record_postponed_eta.v
Main API Changes
declarations.mli:PrimRecordis now defined with a record, including a new argument of typehas_eta.Overlays
Added changelog.
Added / updated documentation.
make doc_gram_rsts.Opened overlay pull requests.