@@ -1591,7 +1591,7 @@ and printTypExpr ~(state : State.t) (typExpr : Parsetree.core_type) cmtTbl =
1591
1591
let doc = printTypExpr ~state n cmtTbl in
1592
1592
match n.ptyp_desc with
1593
1593
| Ptyp_arrow _ | Ptyp_tuple _ | Ptyp_alias _ -> addParens doc
1594
- | _ when Ast_uncurried. typeIsUncurriedFun n -> addParens doc
1594
+ | _ when Ast_uncurried. coreTypeIsUncurriedFun n -> addParens doc
1595
1595
| _ -> doc
1596
1596
in
1597
1597
Doc. group
@@ -1652,7 +1652,7 @@ and printTypExpr ~(state : State.t) (typExpr : Parsetree.core_type) cmtTbl =
1652
1652
let needsParens =
1653
1653
match typ.ptyp_desc with
1654
1654
| Ptyp_arrow _ -> true
1655
- | _ when Ast_uncurried. typeIsUncurriedFun typ -> true
1655
+ | _ when Ast_uncurried. coreTypeIsUncurriedFun typ -> true
1656
1656
| _ -> false
1657
1657
in
1658
1658
let doc = printTypExpr ~state typ cmtTbl in
@@ -1664,7 +1664,7 @@ and printTypExpr ~(state : State.t) (typExpr : Parsetree.core_type) cmtTbl =
1664
1664
| Ptyp_object (fields , openFlag ) ->
1665
1665
printObject ~state ~inline: false fields openFlag cmtTbl
1666
1666
| Ptyp_arrow _ -> printArrow ~uncurried: false typExpr
1667
- | Ptyp_constr _ when Ast_uncurried. typeIsUncurriedFun typExpr ->
1667
+ | Ptyp_constr _ when Ast_uncurried. coreTypeIsUncurriedFun typExpr ->
1668
1668
let arity, tArg = Ast_uncurried. typeExtractUncurriedFun typExpr in
1669
1669
printArrow ~uncurried: true ~arity tArg
1670
1670
| Ptyp_constr (longidentLoc, [{ptyp_desc = Ptyp_object (fields, openFlag)}])
@@ -4018,7 +4018,7 @@ and printPexpApply ~state expr cmtTbl =
4018
4018
argsDoc;
4019
4019
]
4020
4020
else
4021
- let argsDoc = printArguments ~state ~dotted args cmtTbl in
4021
+ let argsDoc = printArguments ~state ~dotted ~partial args cmtTbl in
4022
4022
Doc. concat [printAttributes ~state attrs cmtTbl; callExprDoc; argsDoc]
4023
4023
| _ -> assert false
4024
4024
@@ -4524,7 +4524,7 @@ and printArgumentsWithCallbackInLastPosition ~state ~dotted args cmtTbl =
4524
4524
Lazy. force breakAllArgs;
4525
4525
]
4526
4526
4527
- and printArguments ~state ~dotted
4527
+ and printArguments ~state ~dotted ?( partial = false )
4528
4528
(args : (Asttypes.arg_label * Parsetree.expression) list ) cmtTbl =
4529
4529
match args with
4530
4530
| [
@@ -4564,7 +4564,7 @@ and printArguments ~state ~dotted
4564
4564
~sep: (Doc. concat [Doc. comma; Doc. line])
4565
4565
(List. map (fun arg -> printArgument ~state arg cmtTbl) args);
4566
4566
]);
4567
- Doc. trailingComma;
4567
+ ( if partial then Doc. nil else Doc. trailingComma) ;
4568
4568
Doc. softLine;
4569
4569
Doc. rparen;
4570
4570
])
0 commit comments