aboutsummaryrefslogtreecommitdiff
path: root/kernel/mod_typing.ml
diff options
context:
space:
mode:
authorcoq2002-12-18 11:26:53 +0000
committercoq2002-12-18 11:26:53 +0000
commit6754338f5629938f30901e29c10acfaa58ca9174 (patch)
treea6ed790b200a1c2868adc802a813b1ed450ea279 /kernel/mod_typing.ml
parent52c4125fbf1702e256991a1cc069bf3a8dd34768 (diff)
Contexte locale non-vide interdit a la fin d'un module ou module type
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@3453 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'kernel/mod_typing.ml')
-rw-r--r--kernel/mod_typing.ml12
1 files changed, 10 insertions, 2 deletions
diff --git a/kernel/mod_typing.ml b/kernel/mod_typing.ml
index 785e8ebdda..7417b42619 100644
--- a/kernel/mod_typing.ml
+++ b/kernel/mod_typing.ml
@@ -136,10 +136,18 @@ and translate_entry_list env msid is_definition sig_e =
match e with
| SPEconst ce ->
let cb = translate_constant env ce in
- add_constant kn cb env, (l, SEBconst cb), (l, SPBconst cb)
+ begin match cb.const_hyps with
+ | (_::_) -> error_local_context (Some l)
+ | [] ->
+ add_constant kn cb env, (l, SEBconst cb), (l, SPBconst cb)
+ end
| SPEmind mie ->
let mib = translate_mind env mie in
- add_mind kn mib env, (l, SEBmind mib), (l, SPBmind mib)
+ begin match mib.mind_hyps with
+ | (_::_) -> error_local_context (Some l)
+ | [] ->
+ add_mind kn mib env, (l, SEBmind mib), (l, SPBmind mib)
+ end
| SPEmodule me ->
let mb = translate_module env is_definition me in
let mspec =