fix(frontends/lean/elaborator): must take (updated) configuration options into account

This commit is contained in:
Leonardo de Moura 2016-08-18 15:47:49 -07:00
parent 2d15f4335b
commit 7a0158dcab
2 changed files with 5 additions and 0 deletions

View file

@ -63,6 +63,10 @@ elaborator::elaborator(environment const & env, options const & opts, metavar_co
m_ctx(mctx, lctx, get_elab_tc_cache_for(env, opts), transparency_mode::Semireducible) {
}
auto elaborator::mk_pp_ctx(type_context const & ctx) -> pp_fn {
return ::lean::mk_pp_ctx(ctx.env(), m_opts, ctx.mctx(), ctx.lctx());
}
format elaborator::pp_indent(pp_fn const & pp_fn, expr const & e) {
unsigned i = get_pp_indent(m_opts);
return nest(i, line() + pp_fn(e));

View file

@ -83,6 +83,7 @@ private:
expr get_default_numeral_type();
typedef std::function<format(expr const &)> pp_fn;
pp_fn mk_pp_ctx(type_context const & ctx);
format pp_indent(pp_fn const & pp_fn, expr const & e);
format pp_indent(expr const & e);
format pp_overloads(pp_fn const & pp_fn, buffer<expr> const & fns);