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:
parent
d140ff6148
commit
8fd8ff2773
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue