diff options
author | Gaëtan Gilbert <gaetan.gilbert@skyskimmer.net> | 2018-04-12 21:41:03 +0200 |
---|---|---|
committer | Gaëtan Gilbert <gaetan.gilbert@skyskimmer.net> | 2018-05-31 10:13:33 +0200 |
commit | c7bd285555153294ec077cfa05c36bb420716f3b (patch) | |
tree | e6f414e1f0e5914a17c98e104d49691bae27035b /kernel/clambda.ml | |
parent | 4598a26890a896ddcf6cd30758ae07882e245a16 (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/clambda.ml')
-rw-r--r-- | kernel/clambda.ml | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/clambda.ml b/kernel/clambda.ml index 8389dd326..b722e4200 100644 --- a/kernel/clambda.ml +++ b/kernel/clambda.ml @@ -708,12 +708,10 @@ let rec lambda_of_constr env c = Lcofix(init, (names, ltypes, lbodies)) | Proj (p,c) -> - let kn = Projection.constant p in - let cb = lookup_constant kn env.global_env in - let pb = Option.get cb.const_proj in + let pb = lookup_projection p env.global_env in let n = pb.proj_arg in let lc = lambda_of_constr env c in - Lproj (n,kn,lc) + Lproj (n,Projection.constant p,lc) and lambda_of_app env f args = match Constr.kind f with |