diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d484b6f4b..fed8e93aaa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,10 @@ #### :nail_care: Polish +- In uncurried mode, outcome printer swaps curried and uncurries function printing compared to legacy. + +#### :nail_care: Polish + - Add location information to duplicate type definition error messages. https://github.com/rescript-lang/rescript-compiler/pull/6199 - Replace normal module errors with Super_error module, and clean up Super_error. https://github.com/rescript-lang/rescript-compiler/pull/6199 diff --git a/jscomp/syntax/src/res_outcome_printer.ml b/jscomp/syntax/src/res_outcome_printer.ml index 6cea0b9554..c193f14344 100644 --- a/jscomp/syntax/src/res_outcome_printer.ml +++ b/jscomp/syntax/src/res_outcome_printer.ml @@ -319,6 +319,9 @@ let rec printOutTypeDoc (outType : Outcometree.out_type) = ] and printOutArrowType ~uncurried typ = + let uncurried = + if !Config.uncurried <> Legacy then not uncurried else uncurried + in let typArgs, typ = collectArrowArgs typ [] in let args = Doc.join