Skip to content

Commit 00d033a

Browse files
committed
Add version constraint on ppxlib
1 parent 1e5ba18 commit 00d033a

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

ppx/ppx_protocol_conv.ml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ let test_row_mapping t rows =
126126
| Rtag (name, attrs, _, _) -> name, attrs
127127
in
128128
match Attribute.get t.row_attrib row with
129-
| Some name when String.equal row_name name -> `Fst name
129+
| Some name when String.equal row_name.txt name -> `Fst name
130130
| Some name -> `Snd (name, attrs)
131-
| None -> `Fst row_name
131+
| None -> `Fst row_name.txt
132132
) rows
133133
in
134134
let _: string list = List.fold_left ~init:base
@@ -198,7 +198,7 @@ let rec serialize_expr_of_type_descr t ~loc = function
198198
raise_errorf ~loc "Inherited types not supported"
199199
| Rtag (name, _attributes, _bool, core_types) as row ->
200200
let lhs =
201-
ppat_variant ~loc name (mk_pattern core_types)
201+
ppat_variant ~loc name.txt (mk_pattern core_types)
202202
in
203203
let args =
204204
List.mapi ~f:(
@@ -211,7 +211,7 @@ let rec serialize_expr_of_type_descr t ~loc = function
211211
let rhs =
212212
let constr_name = match Attribute.get t.row_attrib row with
213213
| Some key -> key
214-
| None -> name
214+
| None -> name.txt
215215
in
216216
[%expr ( [%e estring ~loc constr_name ],
217217
[%e args |> list_expr ~loc] )]
@@ -289,7 +289,7 @@ let rec deserialize_expr_of_type_descr t ~loc = function
289289
let lhs =
290290
let constr_name = match Attribute.get t.row_attrib row with
291291
| Some key -> key
292-
| None -> name
292+
| None -> name.txt
293293
in
294294
let pcstr s pat = ppat_construct ~loc { loc; txt=Lident s } pat in
295295
core_types
@@ -315,7 +315,7 @@ let rec deserialize_expr_of_type_descr t ~loc = function
315315
|> pexp_tuple ~loc
316316
|> Option.some
317317
in
318-
pexp_variant ~loc name args
318+
pexp_variant ~loc name.txt args
319319
in
320320
case ~lhs ~guard:None ~rhs
321321
in

ppx_protocol_conv.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ depends: [
1313
"ocaml" {>= "4.04"}
1414
"base"
1515
"dune" {build}
16-
"ppxlib"
16+
"ppxlib" {>= "0.3.0"}
1717
"ppx_sexp_conv" {with-test}
1818
"sexplib" {with-test}
1919
"ounit" {with-test}

0 commit comments

Comments
 (0)