aboutsummaryrefslogtreecommitdiffhomepage
path: root/interp
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2005-11-19 10:36:08 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2005-11-19 10:36:08 +0000
commit987f2ffcf62795f9967138d2e8460e7ca0066762 (patch)
treed07a1ef55571e00cf290823e3e732a748d4ee49c /interp
parentef33bf728a89b9a50025c8be3d9e88435792f180 (diff)
Correction de la correction du test sur le nombre de parametres d'une projection
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@7590 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'interp')
-rw-r--r--interp/constrintern.ml12
1 files changed, 6 insertions, 6 deletions
diff --git a/interp/constrintern.ml b/interp/constrintern.ml
index b7be8502d..d59d3871d 100644
--- a/interp/constrintern.ml
+++ b/interp/constrintern.ml
@@ -651,13 +651,13 @@ let merge_impargs l args =
| _ -> a::l)
l args
-let check_projection isproj r =
+let check_projection isproj nargs r =
match (r,isproj) with
- | RRef (loc, ref), Some nth ->
+ | RRef (loc, ref), Some _ ->
(try
let n = Recordops.find_projection_nparams ref + 1 in
- if nth < n then
- user_err_loc (loc,"",str "Projection has not enough parameters");
+ if nargs <> n then
+ user_err_loc (loc,"",str "Projection has not the right number of explicit parameters");
with Not_found ->
user_err_loc
(loc,"",pr_global_env Idset.empty ref ++ str " is not a registered projection"))
@@ -862,7 +862,7 @@ let internalise sigma env allow_soapp lvar c =
intern (ids,None,find_delimiters_scope loc key::scopes) e
| CAppExpl (loc, (isproj,ref), args) ->
let (f,_,args_scopes,_) = intern_reference env lvar ref in
- check_projection isproj f;
+ check_projection isproj (List.length args) f;
RApp (loc, f, intern_args env args_scopes args)
| CApp (loc, (isproj,f), args) ->
let isproj,f,args = match f with
@@ -879,7 +879,7 @@ let internalise sigma env allow_soapp lvar c =
| x -> (intern env f,[],[],[]) in
let args =
intern_impargs c env impargs args_scopes (merge_impargs l args) in
- check_projection isproj c;
+ check_projection isproj (List.length args) c;
(match c with
(* Now compact "(f args') args" *)
| RApp (loc', f', args') -> RApp (join_loc loc' loc, f',args'@args)