Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Linked unboxed-boxed versions of types via # paths #3526

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

rtjoa
Copy link
Contributor

@rtjoa rtjoa commented Jan 29, 2025

Change the typechecking of pairs of types like float and float# so # acts as a postfix operator on paths that accesses the unboxed version of a type. We make this change in preparation for implicit unboxed records (which follow in #3527).

Observable effects:

  1. Aliases of predef types with unboxed versions also get unboxed versions.
type t = float
type u : float64 = t#
  1. Shadowing the boxed version of a type also shadows the unboxed version.
type float
type t = float#
(* Error: "float" has no unboxed version. *)
  1. Some error messages change slightly.

Reviewing

To minimize conflicts with the following PR, some comments are written as if implicit unboxed records already exist.

Stack

  1. Linked unboxed-boxed versions of types via # paths #3526
  2. Implicit unboxed records #3527

Review: @ccasin

@rtjoa rtjoa force-pushed the rtjoa.linked-unboxed-boxed-types branch 3 times, most recently from a89ecb9 to 20b4fd2 Compare January 29, 2025 21:54
@rtjoa rtjoa force-pushed the rtjoa.linked-unboxed-boxed-types branch 2 times, most recently from 90d353f to 1133d3e Compare January 30, 2025 02:15
@rtjoa rtjoa requested a review from ccasin January 30, 2025 02:16
@rtjoa rtjoa marked this pull request as ready for review January 30, 2025 02:16
@rtjoa rtjoa force-pushed the rtjoa.linked-unboxed-boxed-types branch from 1133d3e to 11b5d1c Compare January 30, 2025 02:35
@rtjoa rtjoa changed the title Link unboxed and boxed versions of types via the postfix path operator # Link unboxed-boxed versions of types via # paths Jan 30, 2025
@rtjoa rtjoa changed the title Link unboxed-boxed versions of types via # paths Linked unboxed-boxed versions of types via # paths Jan 30, 2025
@rtjoa rtjoa force-pushed the rtjoa.linked-unboxed-boxed-types branch 3 times, most recently from 10b5a0f to 4c826c1 Compare February 6, 2025 18:05
@rtjoa rtjoa force-pushed the rtjoa.linked-unboxed-boxed-types branch from 4c826c1 to e0c042e Compare February 7, 2025 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant