Skip to content

OCaml 5: Backport flambda-backend#1960 #268

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 3 commits into from
Oct 31, 2023

Conversation

ncik-roberts
Copy link
Contributor

@ncik-roberts ncik-roberts commented Oct 30, 2023

Backports ocaml-flambda/flambda-backend#1960 to ocaml-jst.

The first commit is a merge commit created with jane/pull-backend-patches. I commit the output directly, with conflicts.

The next two commits are changes on top of that. They merit more review scrutiny. Notes:

  • The least invasive change is to match on the exception tag. This is just for a better error message, so I think this is ok. (And we have a test for the better error message.)
  • I drop the mention of the #t syntax for polymorphic variant types, as this was removed in OCaml 5.

Review suggestion: @alanechang

alanechang and others added 2 commits October 31, 2023 07:03
* generalize hint to all unboxed types

* add regression test

* revert previous change

* extra logic in Ptyp_class

* better error wording
@ncik-roberts ncik-roberts force-pushed the pull-flambda-backend-patches-2023-10-30-with-1960 branch from 3a7f2f9 to d23b27c Compare October 31, 2023 11:06
Copy link
Contributor

@alanechang alanechang left a comment

Choose a reason for hiding this comment

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

The changes look good. Agree the match on the exception tag is not ideal but it does seem like the best thing to do here.

@ncik-roberts ncik-roberts merged commit 62df46a into main Oct 31, 2023
mshinwell added a commit that referenced this pull request Jul 1, 2024
commit 62df46a
Author: Nick Roberts <nroberts@janestreet.com>
Date:   Tue Oct 31 11:42:25 2023 -0400

    OCaml 5: Backport flambda-backend#1960 (#268)

    * flambda-backend: Error message: add hint for unboxed types (#1960)

    * generalize hint to all unboxed types

    * add regression test

    * revert previous change

    * extra logic in Ptyp_class

    * better error wording

    * Fix backport of ocaml-flambda#1960

    * Remove mention of now-deprecated t# syntax for poly variant type

    ---------

    Co-authored-by: alanechang <143514551+alanechang@users.noreply.github.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants