-
Notifications
You must be signed in to change notification settings - Fork 464
Cleanup uncurried #6080
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
Cleanup uncurried #6080
Conversation
@@ -24,10 +24,10 @@ subset of the arguments, and return a curried type with the remaining ones https | |||
- Add support for default arguments in uncurried functions https://github.com/rescript-lang/rescript-compiler/pull/5835 | |||
- Inline uncurried application when it is safe https://github.com/rescript-lang/rescript-compiler/pull/5847 | |||
- Support optional named arguments without a final unit in uncurried functions https://github.com/rescript-lang/rescript-compiler/pull/5907 | |||
- Add support for uncurried-always: a mode where everything is considered uncurried, whether with or without the `.`. This can be turned on with `@@uncurriedAlways` locally in a file. Added a project config `"uncurried"`, which propagates to dependencies, and takes the values: `"legacy"` which changes nothing, or `"default"` for uncurried by default, or `"always"` for uncurried-always. | |||
- Add support for uncurried mode: a mode where everything is considered uncurried, whether with or without the `.`. This can be turned on with `@@uncurried` locally in a file. For project-level configuration in `bsconfig.json`, there's a boolean config `"uncurried"`, which propagates to dependencies, to turn on uncurried mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should move this to the top of the list so that people read about this first, not about the "uncurried by default" mode.
Shouldn't the uncurried mode be labeled "experimental" for now, too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changelog will need to be turned around to be in a simple consumable form.
For now, just logging what changes have been made, in case some bugs come up.
Rename `@@uncurried` to `@@uncurried.swap` so relegating it to tests only. Also simplify the setting in bsconfig, which now takes just a boolean.
The Config module is used by the compiler, so the `uncurried` setting needs to be reset on each file as tests compile several files on a single command line (actual project builds don't).
e37b340
to
04f2c2c
Compare
Use just
@@uncurried
for what used to be called uncurried-always. (Just keep@@uncurried.swap
for syntax swap tests, but it's not planned to be user-facing). Also removed@@toUncurried
.Simplify project setting to just a boolean:
"uncurried": true
.