aboutsummaryrefslogtreecommitdiff
path: root/checker/checkInductive.ml
diff options
context:
space:
mode:
Diffstat (limited to 'checker/checkInductive.ml')
-rw-r--r--checker/checkInductive.ml10
1 files changed, 8 insertions, 2 deletions
diff --git a/checker/checkInductive.ml b/checker/checkInductive.ml
index c370a77ea0..ef606c9a75 100644
--- a/checker/checkInductive.ml
+++ b/checker/checkInductive.ml
@@ -101,11 +101,17 @@ let check_kelim k1 k2 = Sorts.family_leq k1 k2
(* Use [eq_ind_chk] because when we rebuild the recargs we have lost
the knowledge of who is the canonical version.
Try with to see test-suite/coqchk/include.v *)
+let eq_nested_types ty1 ty2 = match ty1, ty2 with
+| NestedInd ind1, NestedInd ind2 -> eq_ind_chk ind1 ind2
+| NestedInd _, _ -> false
+| NestedPrimitive c1, NestedPrimitive c2 -> Names.Constant.equal c1 c2
+| NestedPrimitive _, _ -> false
+
let eq_recarg a1 a2 = match a1, a2 with
| Norec, Norec -> true
| Mrec i1, Mrec i2 -> eq_ind_chk i1 i2
- | Imbr i1, Imbr i2 -> eq_ind_chk i1 i2
- | (Norec | Mrec _ | Imbr _), _ -> false
+ | Nested ty1, Nested ty2 -> eq_nested_types ty1 ty2
+ | (Norec | Mrec _ | Nested _), _ -> false
let eq_reloc_tbl = Array.equal (fun x y -> Int.equal (fst x) (fst y) && Int.equal (snd x) (snd y))