feat(frontends/lean/elaborator): generate identifier information for overloaded identifiers

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-08-17 15:18:22 -07:00
parent 0073ddf583
commit dcc8f4e4fc
2 changed files with 9 additions and 1 deletions

View file

@ -159,7 +159,6 @@ num → num
num
-- ACK
-- IDENTIFIER|15|42
f
foo.f
-- ACK
-- ENDINFO

View file

@ -374,6 +374,8 @@ class elaborator {
virtual optional<constraints> next() {
while (m_idx < get_num_choices(m_choice)) {
expr const & c = get_choice(m_choice, m_idx);
expr const & f = get_app_fn(c);
m_elab.save_identifier_info(f);
m_idx++;
try {
new_scope s(m_elab, m_ctx, m_full_ctx);
@ -914,6 +916,13 @@ public:
}
}
void save_identifier_info(expr const & f) {
if (!m_noinfo && infom() && pip() && is_constant(f)) {
if (auto p = pip()->get_pos_info(f))
m_pre_info_data.add_identifier_info(p->first, p->second, const_name(f));
}
}
void save_synth_data(expr const & e, expr const & r) {
if (!m_noinfo && infom() && pip() && is_placeholder(e)) {
if (auto p = pip()->get_pos_info(e)) {