Skip to content

Refactor the ast for record expressions and pattern. #7528

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

Merged
merged 1 commit into from
May 27, 2025

Conversation

cristianoc
Copy link
Collaborator

The record element is now represented as a record instead of a tuple. Because of the presence of several polymorphic functions in the type checker, a unique type 'a record_element is defined, where 'a will be instantiated with either expression or pattern depending on the context.

Copy link

pkg-pr-new bot commented May 27, 2025

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript-lang/rescript@7528

@rescript/darwin-arm64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/darwin-arm64@7528

@rescript/darwin-x64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/darwin-x64@7528

@rescript/linux-arm64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/linux-arm64@7528

@rescript/linux-x64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/linux-x64@7528

@rescript/win32-x64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/win32-x64@7528

commit: df2b120

@cristianoc cristianoc requested review from cknitt and zth May 27, 2025 10:18
Copy link
Collaborator

@zth zth left a comment

Choose a reason for hiding this comment

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

Great stuff!

The record element is now represented as a record instead of a tuple.
Because of the presence of several polymorphic functions in the type checker, a unique type `'a record_element` is defined, where `'a` will be instantiated with either expression or pattern depending on the context.
@cristianoc cristianoc force-pushed the refactor-record-elements branch from f2c7e56 to df2b120 Compare May 27, 2025 11:02
@cristianoc cristianoc merged commit 4a2c1b1 into master May 27, 2025
16 checks passed
@cristianoc cristianoc deleted the refactor-record-elements branch May 27, 2025 11:09
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.

2 participants