Need specific messages for semantic restrictions in the "destruct" tactic. #14409
Labels
kind: bug
An error, flaw, fault or unintended behaviour.
kind: user messages
Improvement of error messages, new warnings, etc.
part: tactics
I noticed some odd handling of semantic restrictions in "destruct" that we may want to clean up.
induction_clause_list
applies a semantic restriction, for which it callserr
, raisingStream.Failure
, which is misleadingly reported as a syntax error. For example,destruct x at 1 using H at 1.
givesSyntax error: [induction_clause_list] expected after 'destruct' (in [simple_tactic]).
The semantic restriction should be reported with a specific message, e.g. "'at' clause not permitted here; the destruction argument already has an 'at' clause"opt_clause
on the end ofinduction_clause_list
is not permitted (Ex:destruct x, y using H at 1
) when there is more than onedestruction_arg
. This should probably get a separate specific message. I expect thisopt_clause
was added as a syntactic convenience for users, but it seems somewhat limited in its applicability and requires a bit of extra description in the doc.I suggest we should give specific messages for these rather than syntax errors.
The text was updated successfully, but these errors were encountered: