aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/ltac/tacinterp.ml
diff options
context:
space:
mode:
authorGravatar Maxime Dénès <mail@maximedenes.fr>2017-10-04 21:05:48 +0200
committerGravatar Maxime Dénès <mail@maximedenes.fr>2017-10-04 21:05:48 +0200
commit1b985e084e89c8d952644031dd03c9b2736261aa (patch)
treecf1d6a1becc3cc92716dcdc645fb7384daee231d /plugins/ltac/tacinterp.ml
parentcf39d22df11bc33d393db42dfd4b5b0a2c8ded16 (diff)
parentcf265ef5e32f08562db702fb545fb5d346e0e924 (diff)
Merge PR #1078: Report missing arguments in error message
Diffstat (limited to 'plugins/ltac/tacinterp.ml')
-rw-r--r--plugins/ltac/tacinterp.ml8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/ltac/tacinterp.ml b/plugins/ltac/tacinterp.ml
index 18348bc11..20f117ff4 100644
--- a/plugins/ltac/tacinterp.ml
+++ b/plugins/ltac/tacinterp.ml
@@ -1394,7 +1394,13 @@ and interp_app loc ist fv largs : Val.t Ftactic.t =
if List.is_empty lval then Ftactic.return v else interp_app loc ist v lval
else
Ftactic.return (of_tacvalue (VFun(push_appl appl largs,trace,newlfun,lvar,body)))
- | _ -> fail
+ | (VFun(appl,trace,olfun,[],body)) ->
+ let extra_args = List.length largs in
+ Tacticals.New.tclZEROMSG (str "Illegal tactic application: got " ++
+ str (string_of_int extra_args) ++
+ str " extra " ++ str (String.plural extra_args "argument") ++
+ str ".")
+ | VRec(_,_) -> fail
else fail
(* Gives the tactic corresponding to the tactic value *)