Skip to content

Commit

Permalink
Suppress warning 32 for show
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Rebours committed Feb 7, 2019
1 parent 71e61a2 commit 59bd33d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src_plugins/ppx_deriving_show.cppo.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 59bd33d

Please sign in to comment.