fix(frontends/lean/info_manager): std::set insert is a noop if set already contains an equivalent element
This commit is contained in:
parent
b7d805a145
commit
a1ea087f8e
3 changed files with 44 additions and 1 deletions
|
@ -350,7 +350,9 @@ struct info_manager::imp {
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_env_info.insert(env_info(l, m_iteration, env, o));
|
env_info info(l, m_iteration, env, o);
|
||||||
|
m_env_info.erase(info);
|
||||||
|
m_env_info.insert(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool is_tactic_type(expr const & e) {
|
static bool is_tactic_type(expr const & e) {
|
||||||
|
|
14
tests/lean/interactive/info.input
Normal file
14
tests/lean/interactive/info.input
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
VISIT info.lean
|
||||||
|
SYNC 9
|
||||||
|
import logic
|
||||||
|
-- print "hello"
|
||||||
|
theorem tst (a b : Prop) : a ∧ b → b ∧ a :=
|
||||||
|
begin
|
||||||
|
intro H,
|
||||||
|
apply and.intro,
|
||||||
|
apply (and.elim_right H),
|
||||||
|
apply (and.elim_left H),
|
||||||
|
end
|
||||||
|
WAIT
|
||||||
|
INFO 6
|
||||||
|
INFO 7
|
27
tests/lean/interactive/info.input.expected.out
Normal file
27
tests/lean/interactive/info.input.expected.out
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
-- BEGINWAIT
|
||||||
|
-- ENDWAIT
|
||||||
|
-- BEGININFO
|
||||||
|
-- TYPE|6|8
|
||||||
|
?M_1 → ?M_2 → ?M_1 ∧ ?M_2
|
||||||
|
-- ACK
|
||||||
|
-- IDENTIFIER|6|8
|
||||||
|
and.intro
|
||||||
|
-- ACK
|
||||||
|
-- ENDINFO
|
||||||
|
-- BEGININFO
|
||||||
|
-- SYMBOL|7|8
|
||||||
|
(
|
||||||
|
-- ACK
|
||||||
|
-- TYPE|7|9
|
||||||
|
a ∧ b → b
|
||||||
|
-- ACK
|
||||||
|
-- IDENTIFIER|7|9
|
||||||
|
and.elim_right
|
||||||
|
-- ACK
|
||||||
|
-- TYPE|7|24
|
||||||
|
a ∧ b
|
||||||
|
-- ACK
|
||||||
|
-- IDENTIFIER|7|24
|
||||||
|
H
|
||||||
|
-- ACK
|
||||||
|
-- ENDINFO
|
Loading…
Add table
Reference in a new issue