aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/extraction/mlutil.ml
diff options
context:
space:
mode:
authorGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2010-09-17 14:12:53 +0000
committerGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2010-09-17 14:12:53 +0000
commit0931ccb78d2555e5c38da66a2e2cd7afc6ae7e94 (patch)
tree7a9de76bc1f4d1306ac532bd3c0a8ca644ad8c1c /plugins/extraction/mlutil.ml
parent7bc7fc79e719202c84e7c60f1f4ab42f5e9bcf8f (diff)
Extraction: multiple fixes related with the Not_found encountered by X. Leroy
Cf. coqdev for the details of the bug report. - Protect some Hashtbl.find and other risky functions in order to avoid as much as possible to end with an irritating Anomaly : Not_found. - Re-enable in pp_ocaml_extern the case of a module-file used as a module (e.g. module A' := A for A.v) when doing modular extraction. - Rework the code that decides to "open" or not modules initially: opening A when A contains a submodule B hides the file B even when B isn't opened itself, we avoid that now. - Fix some tables (sets or maps) used by extraction for which it is critical to consider constants/inductives/global_reference _not_ modulo the equivalence of Elie, but rather via Pervasives.compare. Still to do : avoid appearance of '_a in extracted code. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13424 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'plugins/extraction/mlutil.ml')
-rw-r--r--plugins/extraction/mlutil.ml10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/extraction/mlutil.ml b/plugins/extraction/mlutil.ml
index 49b22a0b7..e8f852266 100644
--- a/plugins/extraction/mlutil.ml
+++ b/plugins/extraction/mlutil.ml
@@ -654,10 +654,10 @@ let rec tmp_head_lams = function
let rec ast_glob_subst s t = match t with
| MLapp ((MLglob ((ConstRef kn) as refe)) as f, a) ->
let a = List.map (fun e -> tmp_head_lams (ast_glob_subst s e)) a in
- (try linear_beta_red a (Refmap.find refe s)
+ (try linear_beta_red a (Refmap'.find refe s)
with Not_found -> MLapp (f, a))
| MLglob ((ConstRef kn) as refe) ->
- (try Refmap.find refe s with Not_found -> t)
+ (try Refmap'.find refe s with Not_found -> t)
| _ -> ast_map (ast_glob_subst s) t
@@ -1257,7 +1257,7 @@ let con_of_string s =
| [] -> assert false
let manual_inline_set =
- List.fold_right (fun x -> Cset.add (con_of_string x))
+ List.fold_right (fun x -> Cset_env.add (con_of_string x))
[ "Coq.Init.Wf.well_founded_induction_type";
"Coq.Init.Wf.well_founded_induction";
"Coq.Init.Wf.Acc_iter";
@@ -1269,10 +1269,10 @@ let manual_inline_set =
"Coq.Init.Logic.eq_rect_r";
"Coq.Init.Specif.proj1_sig";
]
- Cset.empty
+ Cset_env.empty
let manual_inline = function
- | ConstRef c -> Cset.mem c manual_inline_set
+ | ConstRef c -> Cset_env.mem c manual_inline_set
| _ -> false
(* If the user doesn't say he wants to keep [t], we inline in two cases: