From 9069eeb1cb89439b04ccc8d9654cec35394ac440 Mon Sep 17 00:00:00 2001 From: Nathan Rebours Date: Thu, 7 Feb 2019 16:58:04 +0100 Subject: [PATCH] Suppress warning 32 for show --- src_plugins/ppx_deriving_show.cppo.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src_plugins/ppx_deriving_show.cppo.ml b/src_plugins/ppx_deriving_show.cppo.ml index 6d8857f8..12935a13 100644 --- a/src_plugins/ppx_deriving_show.cppo.ml +++ b/src_plugins/ppx_deriving_show.cppo.ml @@ -316,9 +316,10 @@ let str_of_type ~options ~path ({ ptype_loc = loc } as type_decl) = pvar (Ppx_deriving.mangle_type_decl (`Prefix "pp") type_decl) in let show_var = pvar (Ppx_deriving.mangle_type_decl (`Prefix "show") type_decl) in + let no_warn_32 = Ppx_deriving.attr_warning [%expr "-32"] in [Vb.mk (Pat.constraint_ pp_var pp_type) (Ppx_deriving.sanitize ~quoter (polymorphize prettyprinter)); - Vb.mk (Pat.constraint_ show_var show_type) (polymorphize stringprinter);] + Vb.mk ~attrs:[no_warn_32] (Pat.constraint_ show_var show_type) (polymorphize stringprinter);] let () = Ppx_deriving.(register (create deriver