@@ -91,7 +91,11 @@ let rec extract_signature_type_items vis items =
9191 then extract_signature_type_items vis rest
9292 else
9393 let constrs = match td.type_kind with
94+ #if OCAML_VERSION < (5 ,2 ,0 )
9495 | Types. Type_abstract -> []
96+ #else
97+ | Types. Type_abstract _ -> []
98+ #endif
9599 | Type_record (_ , _ ) -> []
96100#if OCAML_VERSION < (4 ,13 ,0 )
97101 | Type_variant cstrs ->
@@ -274,8 +278,18 @@ let rec extract_signature_tree_items : bool -> Typedtree.signature_item list ->
274278let rec read_pattern hide_item pat =
275279 let open Typedtree in
276280 match pat.pat_desc with
277- | Tpat_var (id , loc ) -> [`Value (id, hide_item, Some loc.loc)]
278- | Tpat_alias (pat , id , loc ) -> `Value (id, hide_item, Some loc.loc) :: read_pattern hide_item pat
281+ #if OCAML_VERSION < (5 ,2 ,0 )
282+ | Tpat_var (id , loc ) ->
283+ #else
284+ | Tpat_var (id , loc , _ ) ->
285+ #endif
286+ [`Value (id, hide_item, Some loc.loc)]
287+ #if OCAML_VERSION < (5 ,2 ,0 )
288+ | Tpat_alias (pat , id , loc ) ->
289+ #else
290+ | Tpat_alias (pat , id , loc , _ ) ->
291+ #endif
292+ `Value (id, hide_item, Some loc.loc) :: read_pattern hide_item pat
279293 | Tpat_record (pats , _ ) ->
280294 List. concat (List. map (fun (_ , _ , pat ) -> read_pattern hide_item pat) pats)
281295#if OCAML_VERSION < (4 ,13 ,0 )
0 commit comments