feat(init/meta/interactive): add from synonym for exact
This commit is contained in:
parent
2b35a9b1f0
commit
2ca44459ba
3 changed files with 6 additions and 1 deletions
|
|
@ -258,6 +258,9 @@ meta def exacts : parse pexpr_list_or_texpr → tactic unit
|
|||
| [] := done
|
||||
| (t :: ts) := exact t >> exacts ts
|
||||
|
||||
/-- A synonym for `exact` that allows writing `have/show ..., from ...` in tactic mode. -/
|
||||
meta def «from» := exact
|
||||
|
||||
/--
|
||||
`revert h₁ ... hₙ` applies to any goal with hypotheses `h₁` ... `hₙ`.
|
||||
It moves the hypotheses and its dependencies to the goal target.
|
||||
|
|
|
|||
|
|
@ -77,6 +77,8 @@ tactic.interactive.change q none (loc.ns [])
|
|||
meta def exact (q : parse texpr) : smt_tactic unit :=
|
||||
tactic.interactive.exact q
|
||||
|
||||
meta def «from» := exact
|
||||
|
||||
meta def «assume» (p : parse parse_binders) : smt_tactic unit :=
|
||||
tactic.interactive.assume p
|
||||
|
||||
|
|
|
|||
|
|
@ -1387,7 +1387,7 @@ expr parser::parse_notation(parse_table t, expr * left) {
|
|||
sstream msg;
|
||||
msg << "invalid expression";
|
||||
if (p != pos()) {
|
||||
msg << "starting at " << p.first << ":" << p.second;
|
||||
msg << " starting at " << p.first << ":" << p.second;
|
||||
}
|
||||
return parser_error_or_expr({msg, pos()});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue