aboutsummaryrefslogtreecommitdiff
path: root/library
diff options
context:
space:
mode:
authorfilliatr2000-11-02 15:41:00 +0000
committerfilliatr2000-11-02 15:41:00 +0000
commit33512e2f4d7d0733805efac1b9e69855fdf1777c (patch)
treece4d93e536152834ea0db58dea2a8407644a1023 /library
parente59113f1bdf4d8c98d956c01f51ae019942d92cd (diff)
correction Abstract (et make world passe!)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@794 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'library')
-rw-r--r--library/global.ml7
-rw-r--r--library/global.mli5
2 files changed, 12 insertions, 0 deletions
diff --git a/library/global.ml b/library/global.ml
index 118a189c6c..7b69ca0a85 100644
--- a/library/global.ml
+++ b/library/global.ml
@@ -5,6 +5,7 @@ open Util
open Term
open Instantiate
open Sign
+open Environ
open Safe_typing
open Summary
@@ -54,6 +55,12 @@ let import cenv = global_env := import cenv !global_env
let id_of_global id = Environ.id_of_global (env_of_safe_env !global_env) id
+(*s Function to get an environment from the constants part of the global
+ environment and a given context. *)
+
+let env_of_context hyps =
+ change_hyps (fun _ -> hyps) (env_of_safe_env !global_env)
+
(* Functions of [Inductive], composed with [lookup_mind_specif]. *)
(* Rem:Cannot open Inductive to avoid clash with Inductive.lookup_mind_specif*)
diff --git a/library/global.mli b/library/global.mli
index e9a9503ff3..a59c998231 100644
--- a/library/global.mli
+++ b/library/global.mli
@@ -46,6 +46,11 @@ val import : compiled_env -> unit
val id_of_global : global_reference -> identifier
+(*s Function to get an environment from the constants part of the global
+ environment and a given context. *)
+
+val env_of_context : named_context -> env
+
(*s Re-exported functions of [Inductive], composed with
[lookup_mind_specif]. *)