aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/extraction/modutil.ml
diff options
context:
space:
mode:
authorGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2010-12-21 11:31:57 +0000
committerGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2010-12-21 11:31:57 +0000
commite3696e15775c44990018d1d4aea01c9bf662cd73 (patch)
tree6f14fb168ffe95ef0dd25984a99e0678f53bd89e /plugins/extraction/modutil.ml
parentb1ae368ec3228f7340076ba0d3bc465f79ed44fa (diff)
Extraction: avoid type-unsafe optimisation of pattern-matchings (fix #2413)
We now keep some type information in the "info" field of constructors and cases, and compact a match with some default branches (or remove this match completely) only if this transformation is type-preserving. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13732 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'plugins/extraction/modutil.ml')
-rw-r--r--plugins/extraction/modutil.ml6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/extraction/modutil.ml b/plugins/extraction/modutil.ml
index bb880aeea..bff28aef1 100644
--- a/plugins/extraction/modutil.ml
+++ b/plugins/extraction/modutil.ml
@@ -80,10 +80,10 @@ let ast_iter_references do_term do_cons do_type a =
match a with
| MLglob r -> do_term r
| MLcons (i,r,_) ->
- if lang () = Ocaml then record_iter_references do_term i;
+ if lang () = Ocaml then record_iter_references do_term i.c_kind;
do_cons r
| MLcase (i,_,v) ->
- if lang () = Ocaml then record_iter_references do_term (fst i);
+ if lang () = Ocaml then record_iter_references do_term i.m_kind;
Array.iter (fun (r,_,_) -> do_cons r) v
| _ -> ()
in iter a
@@ -99,7 +99,7 @@ let ind_iter_references do_term do_cons do_type kn ind =
| _ -> ());
Array.iteri (fun j -> cons_iter (ip,j+1)) p.ip_types
in
- if lang () = Ocaml then record_iter_references do_term ind.ind_info;
+ if lang () = Ocaml then record_iter_references do_term ind.ind_kind;
Array.iteri (fun i -> packet_iter (kn,i)) ind.ind_packets
let decl_iter_references do_term do_cons do_type =