Skip to content

Support kind declarations#140

Merged
ccasin merged 2 commits into
ccasin/sync-parser-standardfrom
ccasin/abstract-kinds
May 8, 2026
Merged

Support kind declarations#140
ccasin merged 2 commits into
ccasin/sync-parser-standardfrom
ccasin/abstract-kinds

Conversation

@ccasin
Copy link
Copy Markdown

@ccasin ccasin commented May 3, 2026

This adds support for kind declarations/abstract kinds. It's based on #139.

parser-standard was updated with the current syntax for these in #139, and the formatter already had support for the old, never-implemented kind_abbrev syntax. So, this is mostly just renaming things and minor tweaks. Kind declaration formatting is replaced with a new version based on type declarations, which adds support for attributes and generalizes things so the same formatter can be used for signature with kind_ substitutions (support for which is also added).

The old kind_abbrevation.ml test, deleted in the previous PR, is brought back as abstract_kinds.ml. I had a robot delete the with kinds from it, as there is a new restriction (from the compiler) that with kinds are now allowed in kind manifests. The test is also enhanced to include fully abstract kind declarations and attributes. There is a new test for the signature-level with kind_ substitutions.

Doc comments are missing from all tests, because support for them is busted on the compiler side. I've posted oxcaml/oxcaml#5987 to remedy that, and will import that support here later as a separate PR with its own tests.

@dvulakh dvulakh self-requested a review May 7, 2026 15:17
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
Copy link
Copy Markdown

@dvulakh dvulakh left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@ccasin ccasin merged commit d30de15 into ccasin/sync-parser-standard May 8, 2026
2 checks passed
ccasin added a commit that referenced this pull request May 8, 2026
* Support kind declarations

* test more attributes

Signed-off-by: David Vulakh <dvulakh@janestreet.com>

---------

Signed-off-by: David Vulakh <dvulakh@janestreet.com>
Co-authored-by: David Vulakh <dvulakh@janestreet.com>
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.

2 participants