refactor(library/tactic/intros_tactic): change approach for generating fresh names for nameless 'intros'
This commit is contained in:
parent
f7deabfd19
commit
c2f32cd953
1 changed files with 1 additions and 2 deletions
|
@ -22,7 +22,6 @@ tactic intros_tactic(list<name> _ns, bool relax_main_opaque) {
|
|||
expr t = g.get_type();
|
||||
expr m = g.get_meta();
|
||||
bool gen_names = empty(ns);
|
||||
unsigned nidx = 1;
|
||||
try {
|
||||
while (true) {
|
||||
if (!gen_names && is_nil(ns))
|
||||
|
@ -41,7 +40,7 @@ tactic intros_tactic(list<name> _ns, bool relax_main_opaque) {
|
|||
new_name = head(ns);
|
||||
ns = tail(ns);
|
||||
} else {
|
||||
new_name = g.get_unused_name(name("H"), nidx);
|
||||
new_name = g.get_unused_name(binding_name(t));
|
||||
}
|
||||
expr new_local = mk_local(ngen.next(), new_name, binding_domain(t), binding_info(t));
|
||||
t = instantiate(binding_body(t), new_local);
|
||||
|
|
Loading…
Reference in a new issue