1919
2020open StdLabels
2121open Migrate_parsetree
22- open OCaml_407 .Ast
22+ open OCaml_408 .Ast
2323open Ast_helper
2424open Asttypes
2525open Parsetree
@@ -76,7 +76,7 @@ let fresh_var bound =
7676 in
7777 loop 0
7878
79- module To_current = Migrate_parsetree. Convert (OCaml_407 ) (OCaml_current )
79+ module To_current = Migrate_parsetree. Convert (OCaml_408 ) (OCaml_current )
8080
8181let string_of_core_type typ : string =
8282 let typ = { typ with ptyp_attributes = [] } in
@@ -243,8 +243,8 @@ and write_body_of_tuple_type l ~arg ~poly ~tag =
243243 [% e e]]
244244
245245and write_poly_case r ~arg ~poly =
246- match r with
247- | Parsetree. Rtag ({ txt = label ; _ } , _ , _ , l ) ->
246+ match r.prf_desc with
247+ | Parsetree. Rtag ({ txt = label ; _ } , _ , l ) ->
248248 let i = hash_variant label and n = List. length l in
249249 let v = fresh_var [] in
250250 let lhs = (if n = 0 then None else Some (pvar v)) |> Ast_helper.Pat. variant label
@@ -339,8 +339,8 @@ let recognize_case_of_constructor i l =
339339let recognize_body_of_poly_variant l ~loc =
340340 let l =
341341 let f x =
342- match x with
343- | Parsetree. Rtag ({ txt = label ; _ } , _ , _ , l ) ->
342+ match x.prf_desc with
343+ | Parsetree. Rtag ({ txt = label ; _ } , _ , l ) ->
344344 let i = hash_variant label in
345345 recognize_case_of_constructor i l
346346 | Rinherit { ptyp_desc = Ptyp_constr (lid , _ ); _ } ->
@@ -361,8 +361,8 @@ let maybe_tuple_type = function
361361 | l -> Ast_helper.Typ. tuple l
362362
363363let rec read_poly_case ?decl y x =
364- match x with
365- | Parsetree. Rtag ({ txt = label ; _ } , _ , _ , l ) -> (
364+ match x.prf_desc with
365+ | Parsetree. Rtag ({ txt = label ; _ } , _ , l ) -> (
366366 let i = hash_variant label |> pint in
367367 match l with
368368 | [] -> Ast_helper.Exp. case [% pat? `Cst [% p i]] (Ast_helper.Exp. variant label None )
0 commit comments