Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
- Fix Deno compatibility issues on Windows. https://github.com/rescript-lang/rescript-compiler/pull/6850
- Fix issue with infinite loops with type errors on recursive types. https://github.com/rescript-lang/rescript-compiler/pull/6867
- Fix issue where using partial application `...` can generate code that uses `Curry` at runtime. https://github.com/rescript-lang/rescript-compiler/pull/6872
- Avoid generation of `Curry` with reverse application `|>`. https://github.com/rescript-lang/rescript-compiler/pull/6876

#### :house: Internal

Expand Down
2 changes: 1 addition & 1 deletion jscomp/syntax/src/res_core.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2261,7 +2261,7 @@ and parse_binary_expr ?(context = OrdinaryExpr) ?a p prec =
when p.uncurried_config = Uncurried ->
{b with pexp_desc = Pexp_apply (fun_expr, args @ [(Nolabel, a)])}
| BarGreater, _ when p.uncurried_config = Uncurried ->
Ast_helper.Exp.apply ~loc b [(Nolabel, a)]
Ast_helper.Exp.apply ~loc ~attrs:[uncurried_app_attr] b [(Nolabel, a)]
| _ ->
Ast_helper.Exp.apply ~loc
(make_infix_operator p token start_pos end_pos)
Expand Down
10 changes: 10 additions & 0 deletions jscomp/test/UncurriedAlways.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions jscomp/test/UncurriedAlways.res
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,9 @@ module PartialApplication = {

let fxyz = f3(~x=1, ~y=1, ~z=1, ...)
}

let hello1 = (y, f) => f(y)

let hello2 = (y, f) => y |> f