Skip to content

Suggest different arity functions when it makes sense #7712

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 5 commits into from
Jul 25, 2025

Conversation

zth
Copy link
Collaborator

@zth zth commented Jul 24, 2025

This improves one of the larger newbie foot guns we have left - different arities instead of overloads.

@cknitt @tsnobip can we add more context/make the error even clearer? Might be a bit too much to add something like "In ReScript there are no overloads blablalbla", but maybe some more context could be added.

@zth zth requested review from cknitt, tsnobip and cristianoc July 24, 2025 20:24
@zth zth force-pushed the error-message-suggest-different-arity branch from ec988a5 to b3bfd85 Compare July 24, 2025 20:25
Copy link

pkg-pr-new bot commented Jul 24, 2025

Open in StackBlitz

rescript

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

@rescript/darwin-arm64

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

@rescript/darwin-x64

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

@rescript/linux-arm64

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

@rescript/linux-x64

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

@rescript/win32-x64

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

commit: b38fde1

Copy link
Member

@cknitt cknitt left a comment

Choose a reason for hiding this comment

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

Very cool! 🔥

@zth zth enabled auto-merge (squash) July 25, 2025 09:19
@zth zth merged commit 36824ed into master Jul 25, 2025
27 checks passed
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