From 5b7eafd0f00a16d78f99a27f5c7d5a0de77dc7e6 Mon Sep 17 00:00:00 2001 From: Stephane Glondu Date: Wed, 21 Jul 2010 09:46:51 +0200 Subject: Imported Upstream snapshot 8.3~beta0+13298 --- library/decls.ml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'library/decls.ml') diff --git a/library/decls.ml b/library/decls.ml index 12808310..ac2203cc 100644 --- a/library/decls.ml +++ b/library/decls.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: decls.ml 10841 2008-04-24 07:19:57Z herbelin $ *) +(* $Id$ *) (** This module registers tables for some non-logical informations associated declarations *) @@ -27,9 +27,7 @@ let vartab = ref (Idmap.empty : variable_data Idmap.t) let _ = Summary.declare_summary "VARIABLE" { Summary.freeze_function = (fun () -> !vartab); Summary.unfreeze_function = (fun ft -> vartab := ft); - Summary.init_function = (fun () -> vartab := Idmap.empty); - Summary.survive_module = false; - Summary.survive_section = false } + Summary.init_function = (fun () -> vartab := Idmap.empty) } let add_variable_data id o = vartab := Idmap.add id o !vartab @@ -38,6 +36,10 @@ let variable_opacity id = let (_,opaq,_,_) = Idmap.find id !vartab in opaq let variable_kind id = let (_,_,_,k) = Idmap.find id !vartab in k let variable_constraints id = let (_,_,cst,_) = Idmap.find id !vartab in cst +let variable_secpath id = + let dir = drop_dirpath_prefix (Lib.library_dp()) (variable_path id) in + make_qualid dir id + let variable_exists id = Idmap.mem id !vartab (** Datas associated to global parameters and constants *) @@ -47,9 +49,7 @@ let csttab = ref (Cmap.empty : logical_kind Cmap.t) let _ = Summary.declare_summary "CONSTANT" { Summary.freeze_function = (fun () -> !csttab); Summary.unfreeze_function = (fun ft -> csttab := ft); - Summary.init_function = (fun () -> csttab := Cmap.empty); - Summary.survive_module = false; - Summary.survive_section = false } + Summary.init_function = (fun () -> csttab := Cmap.empty) } let add_constant_kind kn k = csttab := Cmap.add kn k !csttab @@ -59,7 +59,7 @@ let constant_kind kn = Cmap.find kn !csttab let clear_proofs sign = List.fold_right - (fun (id,c,t as d) signv -> + (fun (id,c,t as d) signv -> let d = if variable_opacity id then (id,None,t) else d in Environ.push_named_context_val d signv) sign Environ.empty_named_context_val @@ -70,7 +70,3 @@ let last_section_hyps dir = with Not_found -> sec_ids) (Environ.named_context (Global.env())) ~init:[] - -let is_section_variable = function - | VarRef _ -> true - | _ -> false -- cgit v1.2.3