feat(library/type_inferer): provide the metavar_env to instantiate and lift_free_vars in the type_inferer, it will minimize the number of local_entries needed

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2013-12-14 15:54:49 -08:00
parent 02ee31b786
commit 70b7e519f8

View file

@ -32,7 +32,18 @@ class type_inferer::imp {
cache m_cache;
expr normalize(expr const & e, context const & ctx) {
return m_normalizer(e, ctx);
return m_normalizer(e, ctx, m_menv.to_some_menv());
}
expr lift_free_vars(expr const & e, unsigned s, unsigned d) {
return ::lean::lift_free_vars(e, s, d, m_menv.to_some_menv());
}
expr lift_free_vars(expr const & e, unsigned d) {
return ::lean::lift_free_vars(e, d, m_menv.to_some_menv());
}
expr instantiate(expr const & e, unsigned n, expr const * s) {
return ::lean::instantiate(e, n, s, m_menv.to_some_menv());
}
expr check_type(expr const & e, expr const & s, context const & ctx) {