fix(library/elaborator): bug in free variable normalization (lift was missing)
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
7b0b363b32
commit
97145c0f88
2 changed files with 6 additions and 5 deletions
|
@ -562,7 +562,7 @@ class elaborator::imp {
|
||||||
if (is_var(a)) {
|
if (is_var(a)) {
|
||||||
auto e = find(ctx, var_idx(a));
|
auto e = find(ctx, var_idx(a));
|
||||||
if (e && e->get_body())
|
if (e && e->get_body())
|
||||||
a = *(e->get_body());
|
a = lift_free_vars(*(e->get_body()), var_idx(a) + 1, m_state.m_menv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -633,11 +633,12 @@ void tst19() {
|
||||||
void tst20() {
|
void tst20() {
|
||||||
std::cout << "\nTST 20\n";
|
std::cout << "\nTST 20\n";
|
||||||
environment env;
|
environment env;
|
||||||
|
import_all(env);
|
||||||
metavar_env menv;
|
metavar_env menv;
|
||||||
expr N = Const("N");
|
expr N = Const("N1");
|
||||||
expr M = Const("M");
|
expr M = Const("M1");
|
||||||
env->add_var("N", Type());
|
env->add_var("N1", Type());
|
||||||
env->add_var("M", Type());
|
env->add_var("M1", Type());
|
||||||
env->add_var("f", N >> (M >> M));
|
env->add_var("f", N >> (M >> M));
|
||||||
env->add_var("a", N);
|
env->add_var("a", N);
|
||||||
env->add_var("b", M);
|
env->add_var("b", M);
|
||||||
|
|
Loading…
Reference in a new issue