feat(library/unfold_macros): avoid unnecessary get_value
This commit is contained in:
parent
b07a364d2f
commit
cb7ca51dcb
1 changed files with 2 additions and 0 deletions
|
@ -135,6 +135,8 @@ expr unfold_all_macros(environment const & env, expr const & e) {
|
|||
}
|
||||
|
||||
static bool contains_untrusted_macro(environment const & env, unsigned trust_lvl, declaration const & d) {
|
||||
if (env.trust_lvl() > LEAN_BELIEVER_TRUST_LEVEL)
|
||||
return false;
|
||||
if (contains_untrusted_macro(env, trust_lvl, d.get_type()))
|
||||
return true;
|
||||
return (d.is_definition() || d.is_theorem()) && contains_untrusted_macro(env, trust_lvl, d.get_value());
|
||||
|
|
Loading…
Reference in a new issue