Skip to content

Commit 60358ea

Browse files
committed
Add support for OCaml 5.2
1 parent a4631a9 commit 60358ea

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

libs/indexBuild.ml

+4
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,11 @@ let make_type_expr ~desc ~level ~id =
447447

448448
let trie_of_type_decl ?comments info ty_decl =
449449
match ty_decl.Types.type_kind with
450+
#if OCAML_VERSION >= (5,2,0)
451+
| Types.Type_abstract _ -> [], comments
452+
#else
450453
| Types.Type_abstract -> [], comments
454+
#endif
451455
| Types.Type_open -> [], comments
452456
| Types.Type_record (fields,_repr) ->
453457
List.map

libs/indexPredefined.ml

+7-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@ let mktype name ?(params=[]) ?(def=Otyp_abstract) doc = {
3131
name = name;
3232
ty = Some (Osig_type (
3333
{ otype_name = name;
34-
#if OCAML_VERSION >= (4,12,0)
34+
#if OCAML_VERSION >= (5,2,0)
35+
otype_params = List.map (fun v ->
36+
{ ot_non_gen = false;
37+
ot_name = v;
38+
ot_variance = Asttypes.(NoVariance, NoInjectivity) }
39+
) params;
40+
#elif OCAML_VERSION >= (4,12,0)
3541
otype_params = List.map (fun v -> v,Asttypes.(NoVariance, NoInjectivity)) params;
3642
#else
3743
otype_params = List.map (fun v -> v,(true,true)) params;

0 commit comments

Comments
 (0)