ocaml-ppx-deriving-yojson/ocaml-411.patch

12 lines
760 B
Diff
Raw Normal View History

--- ppx_deriving_yojson-3.5.2.old/src/ppx_deriving_yojson.cppo.ml 2020-02-20 21:01:12.000000000 +0000
+++ ppx_deriving_yojson-3.5.new/src/ppx_deriving_yojson.cppo.ml 2020-04-22 18:15:35.242395194 +0100
@@ -385,7 +385,7 @@
let ty = Typ.poly poly_vars (polymorphize_ser [%type: [%t typ] -> Yojson.Safe.t]) in
let default_fun =
let type_path = String.concat "." (path @ [type_decl.ptype_name.txt]) in
- let e_type_path = Exp.constant (Pconst_string (type_path, None)) in
+ let e_type_path = Exp.constant (Pconst_string (type_path, Location.none, None)) in
[%expr fun _ ->
invalid_arg ("to_yojson: Maybe a [@@deriving yojson] is missing when extending the type "^
[%e e_type_path])]