diff options
author | gregoire <gregoire@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2005-12-02 10:01:15 +0000 |
---|---|---|
committer | gregoire <gregoire@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2005-12-02 10:01:15 +0000 |
commit | bf578ad5e2f63b7a36aeaef5e0597101db1bd24a (patch) | |
tree | c0bc4e5f9ae67b8a03b28134dab3dcfe31d184dd /library | |
parent | 825a338a1ddf1685d55bb5193aa5da078a534e1c (diff) |
Changement des named_context
Ajout de cast indiquant au kernel la strategie a suivre
Resolution du bug sur les coinductifs
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@7639 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'library')
-rw-r--r-- | library/declare.ml | 6 | ||||
-rw-r--r-- | library/declare.mli | 2 | ||||
-rw-r--r-- | library/global.ml | 3 | ||||
-rw-r--r-- | library/global.mli | 5 |
4 files changed, 10 insertions, 6 deletions
diff --git a/library/declare.ml b/library/declare.ml index bb66d3f26..5359290be 100644 --- a/library/declare.ml +++ b/library/declare.ml @@ -355,8 +355,10 @@ let variable_kind id = pi3 (Idmap.find id !vartab) let clear_proofs sign = - List.map - (fun (id,c,t as d) -> if variable_opacity id then (id,None,t) else d) sign + List.fold_right + (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 (* Global references. *) diff --git a/library/declare.mli b/library/declare.mli index c141985be..317c27281 100644 --- a/library/declare.mli +++ b/library/declare.mli @@ -73,7 +73,7 @@ val variable_strength : variable -> strength val variable_kind : variable -> local_kind val find_section_variable : variable -> section_path val last_section_hyps : dir_path -> identifier list -val clear_proofs : named_context -> named_context +val clear_proofs : named_context -> Environ.named_context_val (*s Global references *) diff --git a/library/global.ml b/library/global.ml index b8bc364b0..d4ad97a8c 100644 --- a/library/global.ml +++ b/library/global.ml @@ -39,6 +39,7 @@ let _ = let universes () = universes (env()) let named_context () = named_context (env()) +let named_context_val () = named_context_val (env()) let push_named_assum a = let (cst,env) = push_named_assum a !global_env in @@ -134,7 +135,7 @@ let env_of_context hyps = open Libnames let type_of_reference env = function - | VarRef id -> let (_,_,t) = Environ.lookup_named id env in t + | VarRef id -> Environ.named_type id env | ConstRef c -> Environ.constant_type env c | IndRef ind -> let specif = Inductive.lookup_mind_specif env ind in diff --git a/library/global.mli b/library/global.mli index ef8472d08..a6ed6f411 100644 --- a/library/global.mli +++ b/library/global.mli @@ -32,6 +32,7 @@ val env : unit -> Environ.env val env_is_empty : unit -> bool val universes : unit -> universes +val named_context_val : unit -> Environ.named_context_val val named_context : unit -> Sign.named_context (*s Extending env with variables and local definitions *) @@ -51,7 +52,7 @@ val add_modtype : identifier -> module_type_entry -> kernel_name val add_constraints : constraints -> unit -val set_engagement : Environ.engagement -> unit +val set_engagement : engagement -> unit (*s Interactive modules and module types *) (* Both [start_*] functions take the [dir_path] argument to create a @@ -93,5 +94,5 @@ val import : compiled_library -> Digest.t -> module_path * environment and a given context. *) val type_of_global : Libnames.global_reference -> types -val env_of_context : Sign.named_context -> Environ.env +val env_of_context : Environ.named_context_val -> Environ.env |