fix(frontends/lean/elaborator): @applications don't make thunks

This commit is contained in:
Mario Carneiro 2017-06-21 03:44:12 -04:00 committed by Leonardo de Moura
parent d666742219
commit 09af93186a
2 changed files with 2 additions and 2 deletions

View file

@ -29,7 +29,7 @@ def tail : lazy_list α → lazy_list α
def append : lazy_list α → thunk (lazy_list α) → lazy_list α
| nil l := l ()
| (cons h t) l := cons h (append (t ()) (l ()))
| (cons h t) l := cons h (@append (t ()) l)
def map (f : α → β) : lazy_list α → lazy_list β
| nil := nil

View file

@ -1516,7 +1516,7 @@ expr elaborator::visit_base_app_simple(expr const & _fn, arg_mask amask, buffer<
} else if (i < args.size()) {
expr expected_type = d;
optional<expr> thunk_of;
if (!m_in_pattern) thunk_of = is_thunk(d);
if (!m_in_pattern && amask == arg_mask::Default) thunk_of = is_thunk(d);
if (thunk_of) expected_type = *thunk_of;
// explicit argument
expr ref_arg = get_ref_for_child(args[i], ref);