fix(frontends/lean): ignore reserved notation for pretty printing

Because reserved notation uses `Prop` as a dummy expression, pretty
printing `Prop` unnecessarily invokes pp_notation on every reserved
notation entry.
This commit is contained in:
Sebastian Ullrich 2015-09-27 23:43:59 +02:00 committed by Leonardo de Moura
parent d140ff6148
commit 8fd8ff2773

View file

@ -1221,6 +1221,8 @@ auto pretty_fn::pp_notation(expr const & e) -> optional<result> {
if (!m_notation || is_var(e))
return optional<result>();
for (notation_entry const & entry : get_notation_entries(m_env, head_index(e))) {
if (entry.group() != notation_entry_group::Main)
continue;
if (!m_unicode && !entry.is_safe_ascii())
continue; // ignore this notation declaration since unicode support is not enabled
unsigned num_params = get_num_parameters(entry);