Skip to content

Display non_null_value as value#2613

Merged
dkalinichenko-js merged 8 commits intodkalinichenko/non_null_value_predefsfrom
dkalinichenko/hide-non-null-from-users
May 29, 2024
Merged

Display non_null_value as value#2613
dkalinichenko-js merged 8 commits intodkalinichenko/non_null_value_predefsfrom
dkalinichenko/hide-non-null-from-users

Conversation

@dkalinichenko-js
Copy link
Copy Markdown
Collaborator

Display non_null_value as value unless the extension universe is set to alpha.
Still show non_null_value on 1) annotation errors 2) sublayout errors between value and non_null_value.

2 should be impossible to trigger without enabling alpha layouts. Create a stub for the Or_null module in stdlib_alpha for testing this error.

@dkalinichenko-js dkalinichenko-js marked this pull request as ready for review May 23, 2024 17:46
@dkalinichenko-js dkalinichenko-js force-pushed the dkalinichenko/non_null_value_predefs branch from fcb4f37 to e213962 Compare May 27, 2024 14:46
@dkalinichenko-js dkalinichenko-js force-pushed the dkalinichenko/hide-non-null-from-users branch from 0fa1ec6 to 0fb138c Compare May 27, 2024 14:48
@goldfirere
Copy link
Copy Markdown
Collaborator

Is this ready to merge? Are you waiting for further review from me?

After a rebase, it's hard to know what I've reviewed and what I haven't. So if you want further review, please ask (ideally with a commit range). If the little changes don't merit scrutiny, feel free to merge.

@dkalinichenko-js dkalinichenko-js merged commit d6bb569 into dkalinichenko/non_null_value_predefs May 29, 2024
@dkalinichenko-js dkalinichenko-js deleted the dkalinichenko/hide-non-null-from-users branch May 29, 2024 13:33
dkalinichenko-js added a commit that referenced this pull request May 29, 2024
* `non_null_value_creation_reason`

* Immediates are non-null

* Primitives are non-null

* Extensible variants are non-null

* Boxed variants are non-null

* Boxed records are non-null

* Tuples are non-null

* Polymorphic variants are non-null

* Arrows are non-null

* First-class modules are non-null

* Basic tests

* More tests

* More tests

* Leave `lazy_t` nullable for now

* More basic tests

* More tests

* Format

* Update ocaml/testsuite/tests/typing-layouts-non-null-value/basics.ml

Co-authored-by: Richard Eisenberg <reisenberg@janestreet.com>

* stable -> upstream_compatible

* Update comments and tests

* Display `non_null_value` as `value` (#2613)

* Naive hack

* Promote tests

* More hacks

* More hacks + promote tests

* Test hiding

* Stub `Or_null` module

* Test sublayot error

* Formatting

---------

Co-authored-by: Diana Kalinichenko <dkalinichenko@janestreet.com>

---------

Co-authored-by: Diana Kalinichenko <dkalinichenko@janestreet.com>
Co-authored-by: Richard Eisenberg <reisenberg@janestreet.com>
lukemaurer pushed a commit to lukemaurer/flambda-backend that referenced this pull request Oct 23, 2024
* `non_null_value_creation_reason`

* Immediates are non-null

* Primitives are non-null

* Extensible variants are non-null

* Boxed variants are non-null

* Boxed records are non-null

* Tuples are non-null

* Polymorphic variants are non-null

* Arrows are non-null

* First-class modules are non-null

* Basic tests

* More tests

* More tests

* Leave `lazy_t` nullable for now

* More basic tests

* More tests

* Format

* Update ocaml/testsuite/tests/typing-layouts-non-null-value/basics.ml

Co-authored-by: Richard Eisenberg <reisenberg@janestreet.com>

* stable -> upstream_compatible

* Update comments and tests

* Display `non_null_value` as `value` (oxcaml#2613)

* Naive hack

* Promote tests

* More hacks

* More hacks + promote tests

* Test hiding

* Stub `Or_null` module

* Test sublayot error

* Formatting

---------

Co-authored-by: Diana Kalinichenko <dkalinichenko@janestreet.com>

---------

Co-authored-by: Diana Kalinichenko <dkalinichenko@janestreet.com>
Co-authored-by: Richard Eisenberg <reisenberg@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