Skip to content

Conversation

zth
Copy link
Member

@zth zth commented Aug 25, 2025

Just a small tweak. Happy for feedback on the hint message itself.

I'll add a changelog just before merging.

@zth zth requested review from tsnobip, nojaf and mediremi August 25, 2025 16:35
Copy link

pkg-pr-new bot commented Aug 25, 2025

Open in StackBlitz

rescript

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

@rescript/darwin-arm64

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

@rescript/darwin-x64

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

@rescript/linux-arm64

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

@rescript/linux-x64

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

@rescript/runtime

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

@rescript/win32-x64

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

commit: c5bd1ff

- Missing arguments that must be provided: ~d, ~c, ~b
- Hint: Did you want to partially apply the function? You can do that by putting `...` just before the closing parens of the function call
Copy link
Member

@mediremi mediremi Aug 25, 2025

Choose a reason for hiding this comment

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

Would it be possible to give a code example using the actual function and args the user tried to apply?

- Hint: Did you want to partially apply the function?
  You can do that by putting `...` just before the closing parens of the function call:
  f(v, ...)

Copy link
Member Author

Choose a reason for hiding this comment

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

Definitely! Just problematic if the function application is large, but maybe it's fine.

Copy link
Member Author

Choose a reason for hiding this comment

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

@mediremi turns out we're not in the error reporting place where we have the "rewrite the expr and show" facilities we normally have. But, I added a generic example that I think is good enough: c137929

What do you think?

Copy link
Member

Choose a reason for hiding this comment

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

I'm happy with that 👍

@zth zth enabled auto-merge (squash) August 26, 2025 20:09
@zth zth force-pushed the error-hint-partial-application branch from d33d948 to c5bd1ff Compare August 26, 2025 20:09
@zth zth merged commit 54f118d into master Aug 26, 2025
25 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