aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel/inductive.ml
diff options
context:
space:
mode:
authorGravatar Gaëtan Gilbert <gaetan.gilbert@skyskimmer.net>2018-04-12 21:41:03 +0200
committerGravatar Gaëtan Gilbert <gaetan.gilbert@skyskimmer.net>2018-05-31 10:13:33 +0200
commitc7bd285555153294ec077cfa05c36bb420716f3b (patch)
treee6f414e1f0e5914a17c98e104d49691bae27035b /kernel/inductive.ml
parent4598a26890a896ddcf6cd30758ae07882e245a16 (diff)
Reduce circular dependency constants <-> projections
Instead of having the projection data in the constant data we have it independently in the environment.
Diffstat (limited to 'kernel/inductive.ml')
-rw-r--r--kernel/inductive.ml4
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/inductive.ml b/kernel/inductive.ml
index 9bed598bb..090acdf16 100644
--- a/kernel/inductive.ml
+++ b/kernel/inductive.ml
@@ -803,9 +803,7 @@ let rec subterm_specif renv stack t =
(* We take the subterm specs of the constructor of the record *)
let wf_args = (dest_subterms wf).(0) in
(* We extract the tree of the projected argument *)
- let kn = Projection.constant p in
- let cb = lookup_constant kn renv.env in
- let pb = Option.get cb.const_proj in
+ let pb = lookup_projection p renv.env in
let n = pb.proj_arg in
spec_of_tree (List.nth wf_args n)
| Dead_code -> Dead_code