Skip to content

Oxcaml: Support for modes#1454

Open
art-w wants to merge 2 commits into
ocaml:masterfrom
art-w:oxcaml-modes
Open

Oxcaml: Support for modes#1454
art-w wants to merge 2 commits into
ocaml:masterfrom
art-w:oxcaml-modes

Conversation

@art-w

@art-w art-w commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

This PR adds support for rendering OxCaml modes. Most of the complexity comes from the heuristics copied from the OxCaml compiler to omit modes which are either legacy, implied by other axes, or inferred from the context (for arrow types, e.g. a @ local -> b -> c -> d is internally represented as a @ local -> (b -> (c -> d @ local) @ local) @ local because a partial application of the first argument a @ local must return a local closure (otherwise the local value could escape its scope)... but since the @ local expansion is unreadable, we display the short form as it implies the long one)

Fixes #1417

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.

Support OxCaml modes

1 participant