fix(kernel/printer): improve printer for Type expressions
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
c635c16637
commit
b57f492e2d
2 changed files with 7 additions and 2 deletions
|
@ -202,7 +202,12 @@ bool operator<(level const & l1, level const & l2) {
|
||||||
std::ostream & operator<<(std::ostream & out, level const & l) {
|
std::ostream & operator<<(std::ostream & out, level const & l) {
|
||||||
switch (kind(l)) {
|
switch (kind(l)) {
|
||||||
case level_kind::UVar: out << uvar_name(l); return out;
|
case level_kind::UVar: out << uvar_name(l); return out;
|
||||||
case level_kind::Lift: out << lift_of(l) << "+" << lift_offset(l); return out;
|
case level_kind::Lift:
|
||||||
|
if (lift_of(l).is_bottom())
|
||||||
|
out << lift_offset(l);
|
||||||
|
else
|
||||||
|
out << lift_of(l) << "+" << lift_offset(l);
|
||||||
|
return out;
|
||||||
case level_kind::Max:
|
case level_kind::Max:
|
||||||
out << "(max";
|
out << "(max";
|
||||||
for (unsigned i = 0; i < max_size(l); i++)
|
for (unsigned i = 0; i < max_size(l); i++)
|
||||||
|
|
|
@ -50,7 +50,7 @@ struct print_expr_fn {
|
||||||
if (a == Type()) {
|
if (a == Type()) {
|
||||||
out() << "Type";
|
out() << "Type";
|
||||||
} else {
|
} else {
|
||||||
out() << "Type " << ty_level(a);
|
out() << "(Type " << ty_level(a) << ")";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue