diff options
author | Tej Chajed <tchajed@mit.edu> | 2017-09-21 18:36:00 -0400 |
---|---|---|
committer | Tej Chajed <tchajed@mit.edu> | 2017-09-21 18:36:00 -0400 |
commit | cf265ef5e32f08562db702fb545fb5d346e0e924 (patch) | |
tree | 3095c86d1d93d2a23cf75f58f5758a468d73ff07 /plugins/ltac/tacinterp.ml | |
parent | 9933871efd122163f7e2dfe8377b9b2dd384b47b (diff) |
Report missing arguments in error message
Augment the "Illegal tactic application" error message with the number
of extra arguments passed.
Fixes BZ#5753.
Diffstat (limited to 'plugins/ltac/tacinterp.ml')
-rw-r--r-- | plugins/ltac/tacinterp.ml | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/ltac/tacinterp.ml b/plugins/ltac/tacinterp.ml index 8fa95ffb0..3a8526874 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 *) |