fix(frontends/lean): change how "as-is" expressions are handled
Implicit arguments are consumed.
This commit is contained in:
parent
86410d392b
commit
d445857f56
1 changed files with 9 additions and 7 deletions
|
@ -556,10 +556,14 @@ expr elaborator::visit_sort(expr const & e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
expr elaborator::visit_macro(expr const & e, constraint_seq & cs) {
|
expr elaborator::visit_macro(expr const & e, constraint_seq & cs) {
|
||||||
|
if (is_as_is(e)) {
|
||||||
|
return get_as_is_arg(e);
|
||||||
|
} else {
|
||||||
buffer<expr> args;
|
buffer<expr> args;
|
||||||
for (unsigned i = 0; i < macro_num_args(e); i++)
|
for (unsigned i = 0; i < macro_num_args(e); i++)
|
||||||
args.push_back(visit(macro_arg(e, i), cs));
|
args.push_back(visit(macro_arg(e, i), cs));
|
||||||
return update_macro(e, args.size(), args.data());
|
return update_macro(e, args.size(), args.data());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
expr elaborator::visit_constant(expr const & e) {
|
expr elaborator::visit_constant(expr const & e) {
|
||||||
|
@ -760,9 +764,7 @@ pair<expr, constraint_seq> elaborator::visit(expr const & e) {
|
||||||
expr r;
|
expr r;
|
||||||
expr b = e;
|
expr b = e;
|
||||||
constraint_seq cs;
|
constraint_seq cs;
|
||||||
if (is_as_is(e)) {
|
if (is_explicit(e)) {
|
||||||
r = get_as_is_arg(e);
|
|
||||||
} else if (is_explicit(e)) {
|
|
||||||
b = get_explicit_arg(e);
|
b = get_explicit_arg(e);
|
||||||
if (is_sorry(b)) {
|
if (is_sorry(b)) {
|
||||||
r = visit_constant(b);
|
r = visit_constant(b);
|
||||||
|
|
Loading…
Reference in a new issue