fix(frontends/lean/elaborator): pretty print placeholders as '_'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
e7c7d5718a
commit
736b219e65
1 changed files with 18 additions and 13 deletions
|
@ -11,13 +11,15 @@ Author: Leonardo de Moura
|
|||
#include "library/scoped_ext.h"
|
||||
#include "library/coercion.h"
|
||||
#include "library/expr_pair.h"
|
||||
#include "library/placeholder.h"
|
||||
#include "frontends/lean/pp.h"
|
||||
#include "frontends/lean/pp_options.h"
|
||||
#include "frontends/lean/token_table.h"
|
||||
|
||||
namespace lean {
|
||||
static format g_ellipsis_n_fmt= highlight(format("\u2026"));
|
||||
static format g_ellipsis_n_fmt = highlight(format("\u2026"));
|
||||
static format g_ellipsis_fmt = highlight(format("..."));
|
||||
static format g_placeholder_fmt = highlight(format("_"));
|
||||
static format g_lambda_n_fmt = highlight_keyword(format("\u03BB"));
|
||||
static format g_lambda_fmt = highlight_keyword(format("fun"));
|
||||
static format g_forall_n_fmt = highlight_keyword(format("\u2200"));
|
||||
|
@ -342,6 +344,9 @@ auto pretty_fn::pp(expr const & e) -> result {
|
|||
flet<unsigned> let_d(m_depth, m_depth+1);
|
||||
m_num_steps++;
|
||||
|
||||
if (is_placeholder(e))
|
||||
return mk_result(g_placeholder_fmt);
|
||||
|
||||
switch (e.kind()) {
|
||||
case expr_kind::Var: return pp_var(e);
|
||||
case expr_kind::Sort: return pp_sort(e);
|
||||
|
|
Loading…
Reference in a new issue