aboutsummaryrefslogtreecommitdiff
path: root/checker/checkInductive.ml
diff options
context:
space:
mode:
authorGaëtan Gilbert2019-03-06 20:58:26 +0100
committerGaëtan Gilbert2019-03-06 20:58:26 +0100
commitc9fd99644e223ada3aad53915f1cd0d2598882b3 (patch)
tree784938d42cf4c37436c305cf625d240c154ac9c9 /checker/checkInductive.ml
parenta83eac8463787c13a2dbd3903baf2b59ca1a4635 (diff)
parent7b724139a09c5d875131c5861a32d225d5b4b07b (diff)
Merge PR #9476: Constructor type information uses the expanded form.
Reviewed-by: SkySkimmer Reviewed-by: gares
Diffstat (limited to 'checker/checkInductive.ml')
-rw-r--r--checker/checkInductive.ml5
1 files changed, 4 insertions, 1 deletions
diff --git a/checker/checkInductive.ml b/checker/checkInductive.ml
index 4329b2d743..b681fb876e 100644
--- a/checker/checkInductive.ml
+++ b/checker/checkInductive.ml
@@ -89,6 +89,9 @@ let eq_recarg a1 a2 = match a1, a2 with
let eq_reloc_tbl = Array.equal (fun x y -> Int.equal (fst x) (fst y) && Int.equal (snd x) (snd y))
+let eq_in_context (ctx1, t1) (ctx2, t2) =
+ Context.Rel.equal Constr.equal ctx1 ctx2 && Constr.equal t1 t2
+
let check_packet env mind ind
{ mind_typename; mind_arity_ctxt; mind_arity; mind_consnames; mind_user_lc;
mind_nrealargs; mind_nrealdecls; mind_kelim; mind_nf_lc;
@@ -105,7 +108,7 @@ let check_packet env mind ind
check "mind_nrealdecls" Int.(equal ind.mind_nrealdecls mind_nrealdecls);
check "mind_kelim" (check_kelim ind.mind_kelim mind_kelim);
- check "mind_nf_lc" (Array.equal Constr.equal ind.mind_nf_lc mind_nf_lc);
+ check "mind_nf_lc" (Array.equal eq_in_context ind.mind_nf_lc mind_nf_lc);
(* NB: here syntactic equality is not just an optimisation, we also
care about the shape of the terms *)