summarylogtreecommitdiffstats
path: root/ppxlib.diff
blob: a36e18487485cb3ebc89629da9a6d774b459693f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
diff --git a/src/Visitors.ml b/src/Visitors.ml
index 7139ed7..f28925f 100644
--- a/src/Visitors.ml
+++ b/src/Visitors.ml
@@ -1258,7 +1258,7 @@ let type_decls (decls : type_declaration list) : structure =
          also parameterized over the type variable ['self], with a constraint
          that this is the type of [self]. This trick allows us to omit the types
          of the virtual methods, even if these types include type variables. *)
-    dump X.concrete X.ancestors [ ty_self, Invariant ] pself X.name ::
+    dump X.concrete X.ancestors [ ty_self, (NoVariance, NoInjectivity) ] pself X.name ::
     floating "VISITORS.END" [] ::
     []
   )]
diff --git a/src/VisitorsAnalysis.ml b/src/VisitorsAnalysis.ml
index 65b47e4..fa910f0 100644
--- a/src/VisitorsAnalysis.ml
+++ b/src/VisitorsAnalysis.ml
@@ -191,7 +191,7 @@ let fix =
    [ptype_params] of a type definition, and returns the underlying type
    variable. *)
 
-let type_param_to_tyvar ((ty, _) : core_type * variance) : tyvar =
+let type_param_to_tyvar ((ty, _) : core_type * (variance * injectivity)) : tyvar =
   match ty.ptyp_desc with
   | Ptyp_var tv ->
       tv
diff --git a/src/VisitorsGeneration.ml b/src/VisitorsGeneration.ml
index 53a6b1b..a7f28ec 100644
--- a/src/VisitorsGeneration.ml
+++ b/src/VisitorsGeneration.ml
@@ -363,7 +363,7 @@ let with_warnings (w : string) (items : structure_item list) : structure_item =
 
 let class1
   (concrete : bool)
-  (params : (core_type * variance) list)
+  (params : (core_type * (variance * injectivity)) list)
   (name : classe)
   (self : pattern)
   (fields : class_field list)
@@ -497,7 +497,7 @@ module ClassFieldStore () : sig
   val dump:
     bool ->
     Longident.t list ->
-    (core_type * variance) list ->
+    (core_type * (variance * injectivity)) list ->
     pattern ->
     classe ->
     structure_item