aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2006-04-27 19:37:33 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2006-04-27 19:37:33 +0000
commit61d11c649b4cd68e92861e2fea86f6c6a6b5bb6a (patch)
treeff162856b856b8fa11ac367ecf9bfa4a9de29034 /kernel
parent2ec958c3c8d2942242837787a3941abb14702b5c (diff)
Standardisation nom option_app en option_map
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@8752 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'kernel')
-rw-r--r--kernel/cooking.ml2
-rw-r--r--kernel/declarations.ml4
-rw-r--r--kernel/environ.ml2
-rw-r--r--kernel/modops.ml2
-rw-r--r--kernel/safe_typing.ml6
-rw-r--r--kernel/sign.ml2
-rw-r--r--kernel/term.ml2
7 files changed, 10 insertions, 10 deletions
diff --git a/kernel/cooking.ml b/kernel/cooking.ml
index 53a9b9644..dffbb76c0 100644
--- a/kernel/cooking.ml
+++ b/kernel/cooking.ml
@@ -113,7 +113,7 @@ type recipe = {
d_modlist : work_list }
let on_body f =
- option_app (fun c -> Declarations.from_val (f (Declarations.force c)))
+ option_map (fun c -> Declarations.from_val (f (Declarations.force c)))
let cook_constant env r =
let cb = r.d_from in
diff --git a/kernel/declarations.ml b/kernel/declarations.ml
index fbd31f24f..8eb29c4dd 100644
--- a/kernel/declarations.ml
+++ b/kernel/declarations.ml
@@ -171,7 +171,7 @@ type mutual_inductive_body = {
(* TODO: should be changed to non-coping after Term.subst_mps *)
let subst_const_body sub cb = {
const_hyps = (assert (cb.const_hyps=[]); []);
- const_body = option_app (subst_constr_subst sub) cb.const_body;
+ const_body = option_map (subst_constr_subst sub) cb.const_body;
const_type = type_app (subst_mps sub) cb.const_type;
const_body_code = Cemitcodes.subst_to_patch_subst sub cb.const_body_code;
(*const_type_code = Cemitcodes.subst_to_patch sub cb.const_type_code;*)
@@ -208,7 +208,7 @@ let subst_mind sub mib =
map_rel_context (subst_mps sub) mib.mind_params_ctxt;
mind_packets = array_smartmap (subst_mind_packet sub) mib.mind_packets ;
mind_constraints = mib.mind_constraints ;
- mind_equiv = option_app (subst_kn sub) mib.mind_equiv }
+ mind_equiv = option_map (subst_kn sub) mib.mind_equiv }
(*s Modules: signature component specifications, module types, and
diff --git a/kernel/environ.ml b/kernel/environ.ml
index da41b60e9..a1e41c4ec 100644
--- a/kernel/environ.ml
+++ b/kernel/environ.ml
@@ -91,7 +91,7 @@ let named_context_of_val = fst
*** /!\ *** [f t] should be convertible with t *)
let map_named_val f (ctxt,ctxtv) =
let ctxt =
- List.map (fun (id,body,typ) -> (id, option_app f body, f typ)) ctxt in
+ List.map (fun (id,body,typ) -> (id, option_map f body, f typ)) ctxt in
(ctxt,ctxtv)
let empty_named_context = empty_named_context
diff --git a/kernel/modops.ml b/kernel/modops.ml
index 166b23007..5fece5b1f 100644
--- a/kernel/modops.ml
+++ b/kernel/modops.ml
@@ -211,7 +211,7 @@ let resolver_of_environment mbid modtype mp env =
if constant.Declarations.const_opaque then
None
else
- option_app Declarations.force
+ option_map Declarations.force
constant.Declarations.const_body
with Not_found -> error_no_such_label (con_label con')
in
diff --git a/kernel/safe_typing.ml b/kernel/safe_typing.ml
index 2a165f74e..38587f7e5 100644
--- a/kernel/safe_typing.ml
+++ b/kernel/safe_typing.ml
@@ -245,7 +245,7 @@ let start_module l senv =
let end_module l restype senv =
let oldsenv = senv.old in
let modinfo = senv.modinfo in
- let restype = option_app (translate_modtype senv.env) restype in
+ let restype = option_map (translate_modtype senv.env) restype in
let params =
match modinfo.variant with
| NONE | LIBRARY _ | SIG _ -> error_no_module_to_end ()
@@ -514,9 +514,9 @@ let import (dp,mb,depends,engmt) digest senv =
let rec lighten_module mb =
{ mb with
- mod_expr = option_app lighten_modexpr mb.mod_expr;
+ mod_expr = option_map lighten_modexpr mb.mod_expr;
mod_type = lighten_modtype mb.mod_type;
- mod_user_type = option_app lighten_modtype mb.mod_user_type }
+ mod_user_type = option_map lighten_modtype mb.mod_user_type }
and lighten_modtype = function
| MTBident kn as x -> x
diff --git a/kernel/sign.ml b/kernel/sign.ml
index dd22d5b8c..dbf52498d 100644
--- a/kernel/sign.ml
+++ b/kernel/sign.ml
@@ -89,7 +89,7 @@ let push_named_to_rel_context hyps ctxt =
let rec push = function
| (id,b,t) :: l ->
let s, hyps = push l in
- let d = (Name id, option_app (subst_vars s) b, type_app (subst_vars s) t) in
+ let d = (Name id, option_map (subst_vars s) b, type_app (subst_vars s) t) in
id::s, d::hyps
| [] -> [],[] in
let s, hyps = push hyps in
diff --git a/kernel/term.ml b/kernel/term.ml
index e83c32821..b082c091e 100644
--- a/kernel/term.ml
+++ b/kernel/term.ml
@@ -643,7 +643,7 @@ let body_of_type ty = ty
type named_declaration = identifier * constr option * types
type rel_declaration = name * constr option * types
-let map_named_declaration f (id, v, ty) = (id, option_app f v, f ty)
+let map_named_declaration f (id, v, ty) = (id, option_map f v, f ty)
let map_rel_declaration = map_named_declaration
(****************************************************************************)