aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/ltac
diff options
context:
space:
mode:
authorGravatar Maxime Dénès <mail@maximedenes.fr>2017-03-17 09:08:36 +0100
committerGravatar Maxime Dénès <mail@maximedenes.fr>2017-03-17 09:08:36 +0100
commitb317c77e7b40ebf2558d298fddfce4f6997afc5c (patch)
tree633ab3fa6c6409ca1ef4e8d296a45214b4142653 /plugins/ltac
parentac3ee8cba2d27f2be38ba706e49aeee08086d936 (diff)
parent028db341f3cb924c2d1b3a9e0fa5666425130f90 (diff)
Merge PR#428: Report missing tactic arguments in error message
Diffstat (limited to 'plugins/ltac')
-rw-r--r--plugins/ltac/tacinterp.ml9
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/ltac/tacinterp.ml b/plugins/ltac/tacinterp.ml
index 61a70d712..155cb31d8 100644
--- a/plugins/ltac/tacinterp.ml
+++ b/plugins/ltac/tacinterp.ml
@@ -1422,7 +1422,14 @@ and tactic_of_value ist vle =
extra = TacStore.set ist.extra f_trace []; } in
let tac = name_if_glob appl (eval_tactic ist t) in
Profile_ltac.do_profile "tactic_of_value" trace (catch_error_tac trace tac)
- | (VFun _|VRec _) -> Tacticals.New.tclZEROMSG (str "A fully applied tactic is expected.")
+ | VFun (_, _, _,vars,_) ->
+ let numargs = List.length vars in
+ Tacticals.New.tclZEROMSG
+ (str "A fully applied tactic is expected:" ++ spc() ++ Pp.str "missing " ++
+ Pp.str (String.plural numargs "argument") ++ Pp.str " for " ++
+ Pp.str (String.plural numargs "variable") ++ Pp.str " " ++
+ pr_enum pr_name vars ++ Pp.str ".")
+ | VRec _ -> Tacticals.New.tclZEROMSG (str "A fully applied tactic is expected.")
else if has_type vle (topwit wit_tactic) then
let tac = out_gen (topwit wit_tactic) vle in
tactic_of_value ist tac