@Kha `hygienicIntro` is true by default. `hygienicIntro == false` is
the Lean3 behavior. If we find `hygienicIntro` too inconvenient in
practice, we set the default to false.
Versions of `introN` and `intro1` that preserve the binder name.
They are used to implement the idiom: "revert", do something, re-"intro"-tuce
Before this commit `introNP mvarId n` was `intro1 mvarId n [] false`.
It preserves the location of the local declaration.
@Kha This tactic is going to be used to fix another hygiene related bug in
Lean3 :)
Here is small repro for the problem.
```
example (m n k : ℕ) (h : 0 + n = m) (h : k = m) : ... :=
begin
-- Here `h : k = m` is accessible.
rw [nat.zero_add] at *
-- `h : k = m` is not accessible anymore, and it is a name for
-- the simplified `h : n = m` which was inaccessible before.
end
```
@Kha Not sure whether we should have an option for supressing this
information or not.
We need this information for diagnosing problems. For example, I was trying to
understand why the elaborator was looping. I suspected it was the
TC module, but I was not getting any trace messages since the symbol
was overloaded, and the case that did not work was the expensive one :(
@Kha When we write command macros, we can easily expand a command
into multiple ones by using `mkNullNode [cmd_1, ... cmd_n]`. Before
this commit, a tactic macro that expands into a sequence of tactics
had to produce `mkNullNode [tac_1, "; ", ..., "; ", tac_n]`.
I forgot the ";" a few times, and it produces very counterintuitive
behavior. This commit is the last step for fixing this issue.
The previous commits add the `withResultOf p f` combinator that allows
us to implement variants of the `unboxSingleton` trick. Now,
```
`(tactic| t)
```
Produces just `t` as before, but
```
`(tactic| t_1; t_2)
```
produces
```
Syntax.node `Tactic.seq [[t_1, "; ", t_2]]
```
instead of
```
Syntax.node `null [t_1, "; ", t_2]
```