Commit 1f36e734 authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Better error message when the argument of iSpecialize is not a hypothesis.

parent 4b2f81cc
......@@ -338,6 +338,8 @@ Tactic Notation "iSpecializeCore" open_constr(t) "as" constr(p) tactic(tac) :=
end in
lazymatch t with
| ITrm ?H ?xs ?pat =>
lazymatch type of H with
| string =>
lazymatch p with
| true =>
eapply tac_specialize_persistent_helper with _ H _ _ _;
......@@ -348,6 +350,8 @@ Tactic Notation "iSpecializeCore" open_constr(t) "as" constr(p) tactic(tac) :=
|env_cbv; reflexivity|tac H]
| false => iSpecializeArgs H xs; iSpecializePat H pat; last (tac H)
end
| _ => fail "iSpecialize:" H "should be a hypothesis, use iPoseProof instead"
end
end.
Tactic Notation "iSpecialize" open_constr(t) :=
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment