fix(library/class): bug in whnf_pred predicate
This commit is contained in:
parent
a551de8f36
commit
43aa6eb87f
1 changed files with 3 additions and 1 deletions
|
|
@ -186,7 +186,9 @@ environment add_instance_core(environment const & env, name const & n, unsigned
|
|||
class_state S = class_ext::get_state(env);
|
||||
type_context::tmp_locals locals(ctx);
|
||||
while (true) {
|
||||
type = ctx.whnf_pred(type, [&](expr const & e) { return !is_constant(e) || !S.m_instances.contains(const_name(e)); });
|
||||
type = ctx.whnf_pred(type, [&](expr const & e) {
|
||||
expr const & fn = get_app_fn(e);
|
||||
return !is_constant(fn) || !S.m_instances.contains(const_name(fn)); });
|
||||
if (!is_pi(type))
|
||||
break;
|
||||
expr x = locals.push_local_from_binding(type);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue