aboutsummaryrefslogtreecommitdiff
path: root/checker/checkInductive.ml
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2020-07-06 16:18:33 +0200
committerPierre-Marie Pédrot2020-07-06 16:18:33 +0200
commit8907a5b7d2b91bff0b573956a05e4679b5238161 (patch)
tree2fff532e687a8e82543044352aeaf3168434aac1 /checker/checkInductive.ml
parent3244b9c6e4159042bae0cd2ad48aba77928d7b2d (diff)
parent0ea2d0ff4ed84e1cc544c958b8f6e98f6ba2e9b6 (diff)
Merge PR #11604: Primitive persistent arrays
Ack-by: JasonGross Ack-by: SkySkimmer Ack-by: ejgallego Ack-by: gares Reviewed-by: ppedrot Ack-by: proux01 Ack-by: silene
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))