File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -659,6 +659,14 @@ let read_type_kind env parent =
659
659
Some (Record lbls)
660
660
| Type_open -> Some Extensible
661
661
662
+ let read_injectivity var =
663
+ #if OCAML_VERSION < (5 , 1 , 0 )
664
+ let _, _, _, inj = Variance. get_lower var in
665
+ #else
666
+ let _, _, inj = Variance. get_lower var in
667
+ #endif
668
+ inj
669
+
662
670
let read_type_parameter abstr var param =
663
671
let open TypeDecl in
664
672
let name = name_of_type param in
@@ -674,10 +682,7 @@ let read_type_parameter abstr var param =
674
682
else if not co then Some Neg
675
683
else None
676
684
end in
677
- let injectivity =
678
- let _,_,_,inj = Variance. get_lower var in
679
- inj
680
- in
685
+ let injectivity = read_injectivity var in
681
686
{desc; variance; injectivity}
682
687
683
688
let read_type_constraints env params =
You can’t perform that action at this time.
0 commit comments