feat(kernel/type_checker): use expression before normalization in the unification constraints generated by the typechecker
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
daef2b7b24
commit
026f666526
1 changed files with 2 additions and 2 deletions
|
@ -68,7 +68,7 @@ class type_checker::imp {
|
||||||
expr B = m_menv->mk_metavar(extend(ctx, g_x_name, A));
|
expr B = m_menv->mk_metavar(extend(ctx, g_x_name, A));
|
||||||
expr p = mk_pi(g_x_name, A, B);
|
expr p = mk_pi(g_x_name, A, B);
|
||||||
justification jst = mk_function_expected_justification(ctx, s);
|
justification jst = mk_function_expected_justification(ctx, s);
|
||||||
m_uc->push_back(mk_eq_constraint(ctx, r, p, jst));
|
m_uc->push_back(mk_eq_constraint(ctx, e, p, jst));
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
throw function_expected_exception(env(), ctx, s);
|
throw function_expected_exception(env(), ctx, s);
|
||||||
|
@ -86,7 +86,7 @@ class type_checker::imp {
|
||||||
return Type();
|
return Type();
|
||||||
if (has_metavar(u) && m_menv && m_uc) {
|
if (has_metavar(u) && m_menv && m_uc) {
|
||||||
justification jst = mk_type_expected_justification(ctx, s);
|
justification jst = mk_type_expected_justification(ctx, s);
|
||||||
m_uc->push_back(mk_convertible_constraint(ctx, u, TypeU, jst));
|
m_uc->push_back(mk_convertible_constraint(ctx, e, TypeU, jst));
|
||||||
return u;
|
return u;
|
||||||
}
|
}
|
||||||
throw type_expected_exception(env(), ctx, s);
|
throw type_expected_exception(env(), ctx, s);
|
||||||
|
|
Loading…
Reference in a new issue