fix(frontends/lean/elaborator): bug in the elaborator reported by Jeremy

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-07-18 23:47:53 +01:00
parent 41a073e0c2
commit 66ba3c8a0b

View file

@ -745,11 +745,13 @@ public:
expr f_type = f_t.second;
lean_assert(is_pi(f_type));
if (!expl) {
while (is_pi(f_type) && binding_info(f_type).is_strict_implicit()) {
while (binding_info(f_type).is_strict_implicit()) {
tag g = f.get_tag();
expr imp_arg = mk_placeholder_meta(some_expr(binding_domain(f_type)), g);
f = mk_app(f, imp_arg, g);
f_type = whnf(instantiate(binding_body(f_type), imp_arg));
auto f_t = ensure_fun(f);
f = f_t.first;
f_type = f_t.second;
}
}
expr d_type = binding_domain(f_type);