chore(frontends/lean): cleaup
This commit is contained in:
parent
65c93b180d
commit
725101c777
2 changed files with 1 additions and 14 deletions
|
@ -1607,14 +1607,7 @@ expr elaborator::visit_prenum(expr const & e, constraint_seq & cs) {
|
||||||
lean_assert(is_prenum(e));
|
lean_assert(is_prenum(e));
|
||||||
mpz const & v = prenum_value(e);
|
mpz const & v = prenum_value(e);
|
||||||
tag e_tag = e.get_tag();
|
tag e_tag = e.get_tag();
|
||||||
// Remark: In HoTT mode, we only partially support the new encoding for numerals.
|
expr A = m_full_context.mk_meta(m_ngen, none_expr(), e_tag);
|
||||||
// We fix A to num, and we rely on coercions to cast them to other types.
|
|
||||||
// This is quite different from the approach used in the standard library
|
|
||||||
expr A;
|
|
||||||
// if (is_standard(env()))
|
|
||||||
A = m_full_context.mk_meta(m_ngen, none_expr(), e_tag);
|
|
||||||
// else
|
|
||||||
// A = mk_constant(get_num_name()).set_tag(e_tag);
|
|
||||||
level A_lvl = sort_level(m_tc->ensure_type(A, cs));
|
level A_lvl = sort_level(m_tc->ensure_type(A, cs));
|
||||||
levels ls(A_lvl);
|
levels ls(A_lvl);
|
||||||
bool is_strict = true;
|
bool is_strict = true;
|
||||||
|
|
|
@ -42,12 +42,6 @@ static unsigned parse_precedence_core(parser & p) {
|
||||||
return p.parse_small_nat();
|
return p.parse_small_nat();
|
||||||
} else {
|
} else {
|
||||||
environment env = p.env();
|
environment env = p.env();
|
||||||
// if (!is_standard(env)) {
|
|
||||||
// // TODO(Leo): remove this if we decide to implement
|
|
||||||
// // arithmetical notation using type classes in the HoTT
|
|
||||||
// // library.
|
|
||||||
// env = open_num_notation(p.env());
|
|
||||||
// }
|
|
||||||
env = open_prec_aliases(env);
|
env = open_prec_aliases(env);
|
||||||
parser::local_scope scope(p, env);
|
parser::local_scope scope(p, env);
|
||||||
expr pre_val = p.parse_expr(get_max_prec());
|
expr pre_val = p.parse_expr(get_max_prec());
|
||||||
|
|
Loading…
Reference in a new issue