chore(library/compiler): skip type checking for _cstage1 declarations

This is a temporary hack for speeding up build time.
This commit is contained in:
Leonardo de Moura 2018-09-17 14:44:09 -07:00
parent b07c718425
commit 5d455bf10a
3 changed files with 7 additions and 6 deletions

View file

@ -252,9 +252,10 @@ class preprocess_fn {
v4, reducibility_hints::mk_opaque(), true);
/* IMPORTANT: We do not need to save the auxiliary declaration in the environment.
This is just a temporary hack.
We should store this information in a different place. Otherwise, we will have
to pay the price of type checking this auxiliary declaration. */
m_env = module::add(m_env, simp_decl);
We should store this information in a different place. In the meantime,
I just invoke `module::add` with `check = false`. This is a temporary
solution since we will not have this parameter in the final version. */
m_env = module::add(m_env, simp_decl, false);
}
name get_real_name(name const & n) {

View file

@ -191,8 +191,8 @@ environment add_and_perform(environment const & env, std::shared_ptr<modificatio
return update(new_env, ext);
}
environment add(environment const & env, declaration const & d) {
environment new_env = env.add(d);
environment add(environment const & env, declaration const & d, bool check) {
environment new_env = env.add(d, check);
if (d.is_definition()) {
definition_val const & v = d.to_definition_val();
if (!check_computable(new_env, v.get_name()))

View file

@ -99,7 +99,7 @@ environment add(environment const & env, std::shared_ptr<modification const> con
environment add_and_perform(environment const & env, std::shared_ptr<modification const> const & modif);
/** \brief Add the given declaration to the environment, and mark it to be exported. */
environment add(environment const & env, declaration const & d);
environment add(environment const & env, declaration const & d, bool check = true);
}
void initialize_module();
void finalize_module();