aboutsummaryrefslogtreecommitdiff
path: root/toplevel
diff options
context:
space:
mode:
authormsozeau2009-04-16 19:04:01 +0000
committermsozeau2009-04-16 19:04:01 +0000
commit8e8f7340dbf3acb706c65b215a76d5d8c68f3a49 (patch)
treedec1dc5293b1c05eac996c66a6cc4cf538ace2fe /toplevel
parent491eb32c55c9b57a5a49ebbdc46f41ca5cb359c7 (diff)
Fix bug #2089: correctly dealing with parameters and real arguments in
Combined Scheme. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12090 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'toplevel')
-rw-r--r--toplevel/command.ml10
1 files changed, 6 insertions, 4 deletions
diff --git a/toplevel/command.ml b/toplevel/command.ml
index d07c4973e0..cb772714d6 100644
--- a/toplevel/command.ml
+++ b/toplevel/command.ml
@@ -1010,16 +1010,18 @@ let build_combined_scheme name schemes =
let (ctx, arity) = decompose_prod ty in
let (_, last) = List.hd ctx in
match kind_of_term last with
- | App (ind, args) -> ctx, destInd ind, Array.length args
+ | App (ind, args) ->
+ let ind = destInd ind in
+ let (_,spec) = Inductive.lookup_mind_specif env ind in
+ ctx, ind, spec.mind_nrealargs
| _ -> ctx, destInd last, 0
in
let defs =
List.map (fun x ->
let refe = Ident x in
let qualid = qualid_of_reference refe in
- let cst = try
- Nametab.locate_constant (snd qualid)
- with Not_found -> error ((string_of_qualid (snd qualid))^" is not declared.")
+ let cst = try Nametab.locate_constant (snd qualid)
+ with Not_found -> error ((string_of_qualid (snd qualid))^" is not declared.")
in
let ty = Typeops.type_of_constant env cst in
qualid, cst, ty)