Skip to content

Commit d3475c0

Browse files
authored
In uncurried mode, outcome printer swaps curried and uncurries function printing compared to legacy. (#6229)
1 parent a7b1ac4 commit d3475c0

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818

1919
#### :nail_care: Polish
2020

21+
- In uncurried mode, outcome printer swaps curried and uncurries function printing compared to legacy.
22+
23+
#### :nail_care: Polish
24+
2125
- Add location information to duplicate type definition error messages. https://github.com/rescript-lang/rescript-compiler/pull/6199
2226
- Replace normal module errors with Super_error module, and clean up Super_error. https://github.com/rescript-lang/rescript-compiler/pull/6199
2327
- `Js.Json.t`, `Js.null` and `Js.nullable` are now untagged variants representing their runtime values, instead of abstract types. https://github.com/rescript-lang/rescript-compiler/pull/6218

jscomp/syntax/src/res_outcome_printer.ml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,9 @@ let rec printOutTypeDoc (outType : Outcometree.out_type) =
319319
]
320320

321321
and printOutArrowType ~uncurried typ =
322+
let uncurried =
323+
if !Config.uncurried <> Legacy then not uncurried else uncurried
324+
in
322325
let typArgs, typ = collectArrowArgs typ [] in
323326
let args =
324327
Doc.join

0 commit comments

Comments
 (0)