From d162f656bd3805571f2c37a21f1a5f0851d635f4 Mon Sep 17 00:00:00 2001
From: nilfit <nils.fitinghoff@gmail.com>
Date: Tue, 17 Jul 2018 16:41:04 +0200
Subject: [PATCH] add parentheses around tyes in Ddata constructors

This prevents syntax errors on star-separated lists of function types.
---
 src/mlw/ocaml_printer.ml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mlw/ocaml_printer.ml b/src/mlw/ocaml_printer.ml
index 716550b29..462782d88 100644
--- a/src/mlw/ocaml_printer.ml
+++ b/src/mlw/ocaml_printer.ml
@@ -588,7 +588,7 @@ module Print = struct
       match cs_args with
       | [] -> fprintf fmt "@[<hov 4>| %a@]" (print_uident info) id
       | l -> fprintf fmt "@[<hov 4>| %a of %a@]" (print_uident info) id
-               (print_list star (print_ty ~paren:false info)) l in
+               (print_list star (print_ty ~paren:true info)) l in
     let print_field fmt (is_mutable, id, ty) =
       fprintf fmt "%s%a: @[%a@];" (if is_mutable then "mutable " else "")
         (print_lident info) id (print_ty ~paren:false info) ty in
-- 
GitLab