aboutsummaryrefslogtreecommitdiffhomepage
path: root/library
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2000-11-27 10:29:02 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2000-11-27 10:29:02 +0000
commit4fb58718b71f7a649eb5516487905ab61088e346 (patch)
tree8aa580651a85289d1088dd7873810a73dacbebc6 /library
parent1ad33441e62419ff735c09588b3e228c313378e1 (diff)
Prise en compte des let in dans les instances de globaux
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@976 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'library')
-rw-r--r--library/declare.ml8
1 files changed, 4 insertions, 4 deletions
diff --git a/library/declare.ml b/library/declare.ml
index 8aa6949e3..b3027a3a1 100644
--- a/library/declare.ml
+++ b/library/declare.ml
@@ -344,7 +344,7 @@ let constr_of_reference sigma env ref =
let hyps = context_of_global_reference sigma env ref in
let hyps0 = current_section_context () in
let env0 = Environ.reset_context env in
- let args = List.map mkVar (ids_of_named_context hyps) in
+ let args = instance_from_named_context hyps in
let body = match ref with
| EvarRef n -> mkEvar (n,Array.of_list args)
| VarRef sp -> mkVar (basename sp)
@@ -392,7 +392,7 @@ let dirpath_of_global = function
let is_global id =
try
- let osp = Nametab.locate (make_qualid [] id) in
+ let osp = Nametab.locate (make_qualid [] (string_of_id id)) in
list_prefix_of (dirpath_of_global osp) (Lib.cwd())
with Not_found ->
false
@@ -426,8 +426,8 @@ let declare_eliminations sp i =
if not (list_subset ids (ids_of_named_context (Global.named_context ()))) then
error ("Declarations of elimination scheme outside the section "^
"of the inductive definition is not implemented");
- let ctxt = Array.of_list (List.map mkVar ids) in
- let mispec = Global.lookup_mind_specif ((sp,i),ctxt) in
+ let ctxt = instance_from_named_context mib.mind_hyps in
+ let mispec = Global.lookup_mind_specif ((sp,i),Array.of_list ctxt) in
let mindstr = string_of_id (mis_typename mispec) in
let declare na c =
declare_constant (id_of_string na)