refactor(frontends/lean): use ascii prefix for auxiliary let-declarations
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
62408a6adc
commit
f0a2d3627e
1 changed files with 9 additions and 9 deletions
|
@ -110,9 +110,9 @@ bool get_pp_def_value(options const & opts) { return opts.get_bool(g_
|
||||||
|
|
||||||
// =======================================
|
// =======================================
|
||||||
// Prefixes for naming local aliases (auxiliary local decls)
|
// Prefixes for naming local aliases (auxiliary local decls)
|
||||||
static name g_kappa("\u03BA");
|
static name g_a("a");
|
||||||
static name g_pho("\u03C1");
|
static name g_b("b");
|
||||||
static name g_nu("\u03BD");
|
static name g_c("c");
|
||||||
// =======================================
|
// =======================================
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1158,16 +1158,16 @@ class pp_fn {
|
||||||
}
|
}
|
||||||
|
|
||||||
name find_unused_prefix(expr const & e) {
|
name find_unused_prefix(expr const & e) {
|
||||||
if (!uses_prefix(e, g_kappa)) {
|
if (!uses_prefix(e, g_a)) {
|
||||||
return g_kappa;
|
return g_a;
|
||||||
} else if (!uses_prefix(e, g_pho)) {
|
} else if (!uses_prefix(e, g_b)) {
|
||||||
return g_pho;
|
return g_b;
|
||||||
} else {
|
} else {
|
||||||
unsigned i = 1;
|
unsigned i = 1;
|
||||||
name n(g_nu, i);
|
name n(g_c, i);
|
||||||
while (uses_prefix(e, n)) {
|
while (uses_prefix(e, n)) {
|
||||||
i++;
|
i++;
|
||||||
n = name(g_nu, i);
|
n = name(g_c, i);
|
||||||
}
|
}
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue