aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorletouzey2012-12-17 11:19:19 +0000
committerletouzey2012-12-17 11:19:19 +0000
commit749972b771d6b58afdb992dcf6d6e574921705ec (patch)
treee524c8a4e7ad1505147a1b189f5dd157594dc8f9 /plugins
parentd2804f160f8ceb3d2032db097c769ee0f1c0ab96 (diff)
Extraction of projections: restrict a hack to ocaml only (fix #2941)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16074 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'plugins')
-rw-r--r--plugins/extraction/extraction.ml7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/extraction/extraction.ml b/plugins/extraction/extraction.ml
index 5b31db3f9a..b892ae57a5 100644
--- a/plugins/extraction/extraction.ml
+++ b/plugins/extraction/extraction.ml
@@ -672,13 +672,16 @@ and extract_cst_app env mle mlt kn args =
(* The ml arguments, already expunged from known logical ones *)
let mla = make_mlargs env mle s args metas in
let mla =
- if not magic1 then
+ if magic1 || lang () <> Ocaml then mla
+ else
try
+ (* for better optimisations later, we discard dependent args
+ of projections and replace them by fake args that will be
+ removed during final pretty-print. *)
let l,l' = List.chop (projection_arity (ConstRef kn)) mla in
if l' <> [] then (List.map (fun _ -> MLexn "Proj Args") l) @ l'
else mla
with _ -> mla
- else mla
in
(* For strict languages, purely logical signatures with at least
one [Kill Kother] lead to a dummy lam. So a [MLdummy] is left