feat: add macro withoutExpectedType! <term>
This commit is contained in:
parent
09ed75f517
commit
d212a5b671
1 changed files with 6 additions and 0 deletions
|
|
@ -107,6 +107,12 @@ macro_rules
|
|||
| `({ $x : $type // $p }) => `(Subtype (fun ($x:ident : $type) => $p))
|
||||
| `({ $x // $p }) => `(Subtype (fun ($x:ident : _) => $p))
|
||||
|
||||
/-
|
||||
`withoutExpected! t` instructs Lean to elaborate `t` without an expected type.
|
||||
Recall that terms such as `match ... with ...` and `⟨...⟩` will postpone elaboration until
|
||||
expected type is known. So, `withoutExpected!` is not effective in this case. -/
|
||||
macro "withoutExpectedType! " x:term : term => `(let aux := $x; aux)
|
||||
|
||||
namespace Lean.Parser.Tactic
|
||||
|
||||
syntax[intro] "intro " notFollowedBy("|") (colGt term:max)* : tactic
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue