aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/extraction
diff options
context:
space:
mode:
authorGravatar Maxime Dénès <mail@maximedenes.fr>2017-08-01 13:01:44 +0200
committerGravatar Maxime Dénès <mail@maximedenes.fr>2017-08-01 13:01:44 +0200
commit72c69399c0d4b37174f9d91ac79fc359619eb63c (patch)
tree92cecb569052db252a3d7843e106262492b770af /plugins/extraction
parent23abe7ade3683168e4c7adf2aceb5045e2565e68 (diff)
parentdc38423a70e63206f8c4127182d3f2d703025a0d (diff)
Merge PR #909: Extraction: reduce primitive projections in types (fix bug 4709)
Diffstat (limited to 'plugins/extraction')
-rw-r--r--plugins/extraction/extraction.ml6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/extraction/extraction.ml b/plugins/extraction/extraction.ml
index 661842790..7644b49ce 100644
--- a/plugins/extraction/extraction.ml
+++ b/plugins/extraction/extraction.ml
@@ -295,7 +295,11 @@ let rec extract_type env db j c args =
| Ind ((kn,i),u) ->
let s = (extract_ind env kn).ind_packets.(i).ip_sign in
extract_type_app env db (IndRef (kn,i),s) args
- | Case _ | Fix _ | CoFix _ | Proj _ -> Tunknown
+ | Proj (p,t) ->
+ (* Let's try to reduce, if it hasn't already been done. *)
+ if Projection.unfolded p then Tunknown
+ else extract_type env db j (Term.mkProj (Projection.unfold p, t)) args
+ | Case _ | Fix _ | CoFix _ -> Tunknown
| _ -> assert false
(*s Auxiliary function dealing with type application.