Skip to content

Add [@@or_null_reexport]#2869

Merged
dkalinichenko-js merged 7 commits intomainfrom
dkalinichenko/reexport-or-null
Aug 2, 2024
Merged

Add [@@or_null_reexport]#2869
dkalinichenko-js merged 7 commits intomainfrom
dkalinichenko/reexport-or-null

Conversation

@dkalinichenko-js
Copy link
Copy Markdown
Collaborator

Add [@@or_null_reexport], an attribute for re-exporting the constructors of 'a or_null, because they can't be defined by users.

Between type 'a t [@@or_null_reexport] and type 'a t = 'a or_null [@@or_null_reexport] this PR chooses the latter to avoid unnecessary work in typedecl.ml. With the manifest set by user, we can delay updating type_kind until relatively late in typechecking.

Also fix or_null.mli to use 'a t instead of 'a or_null.

@dkalinichenko-js dkalinichenko-js merged commit bca81e9 into main Aug 2, 2024
@dkalinichenko-js dkalinichenko-js deleted the dkalinichenko/reexport-or-null branch August 2, 2024 20:34
lukemaurer pushed a commit to lukemaurer/flambda-backend that referenced this pull request Oct 23, 2024
* `or_null_reexport`

* fix `or_null` mli

* fix test

* Fixes

* Variance and injectivity annotations

* type parameter tests

* more fixes

---------

Co-authored-by: Diana Kalinichenko <dkalinichenko@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.

3 participants