diff --git a/lib/Params.ml b/lib/Params.ml index 986b70f9bf..b1e49ba364 100644 --- a/lib/Params.ml +++ b/lib/Params.ml @@ -214,12 +214,11 @@ module Exp = struct let break_fun_decl_args c ~ctx ~last_arg ~has_label = match ctx with - | _ when not last_arg && ocp c -> str " " + | _ when (not last_arg) && ocp c -> str " " | Ast.Str _ -> (* special case that break the arrow in [let _ = fun ... ->] *) str " " - | _ -> - break 1 (if last_arg && has_label && not (ocp c) then 0 else -2) + | _ -> break 1 (if last_arg && has_label && not (ocp c) then 0 else -2) let single_line_function ~ctx ~ctx0 ~args = match ctx_is_apply_and_exp_is_arg ~ctx ctx0 with diff --git a/lib/Params.mli b/lib/Params.mli index df2e30ec9a..867eda78b7 100644 --- a/lib/Params.mli +++ b/lib/Params.mli @@ -66,7 +66,7 @@ module Exp : sig attributes. *) val break_fun_decl_args : - Conf.t -> ctx:Ast.t -> last_arg:bool -> has_label:bool -> Fmt.t + Conf.t -> ctx:Ast.t -> last_arg:bool -> has_label:bool -> Fmt.t val single_line_function : ctx:Ast.t -> ctx0:Ast.t -> args:'a list -> bool