@@ -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
0 commit comments