diff options
author | Maxime Dénès <mail@maximedenes.fr> | 2018-06-01 15:40:57 +0200 |
---|---|---|
committer | Maxime Dénès <mail@maximedenes.fr> | 2018-06-01 15:40:57 +0200 |
commit | 04756f75bf54b1ccda8c180c62b14c5eaaaabb67 (patch) | |
tree | adbf0a9beef9c5b804fdb4f3a0e7a58bb967a0e0 /plugins | |
parent | 3a36761a27487e8917e1b59b59abacc2a7e65b95 (diff) | |
parent | c7bd285555153294ec077cfa05c36bb420716f3b (diff) |
Merge PR #7234: Reduce circular dependency constants <-> projections
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/extraction/extraction.ml | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/plugins/extraction/extraction.ml b/plugins/extraction/extraction.ml index cdd698304..5aee70194 100644 --- a/plugins/extraction/extraction.ml +++ b/plugins/extraction/extraction.ml @@ -1066,8 +1066,10 @@ let extract_constant env kn cb = | Undef _ -> warn_info (); mk_typ_ax () | Def c -> (match cb.const_proj with - | None -> mk_typ (get_body c) - | Some pb -> mk_typ (EConstr.of_constr pb.proj_body)) + | false -> mk_typ (get_body c) + | true -> + let pb = lookup_projection (Projection.make kn false) env in + mk_typ (EConstr.of_constr pb.proj_body)) | OpaqueDef c -> add_opaque r; if access_opaque () then mk_typ (get_opaque env c) @@ -1077,8 +1079,10 @@ let extract_constant env kn cb = | Undef _ -> warn_info (); mk_ax () | Def c -> (match cb.const_proj with - | None -> mk_def (get_body c) - | Some pb -> mk_def (EConstr.of_constr pb.proj_body)) + | false -> mk_def (get_body c) + | true -> + let pb = lookup_projection (Projection.make kn false) env in + mk_def (EConstr.of_constr pb.proj_body)) | OpaqueDef c -> add_opaque r; if access_opaque () then mk_def (get_opaque env c) |