chore: update stage0
This commit is contained in:
parent
96d00ff2d7
commit
04ecce0085
2 changed files with 7 additions and 1 deletions
3
stage0/src/library/compiler/csimp.cpp
generated
3
stage0/src/library/compiler/csimp.cpp
generated
|
|
@ -1149,7 +1149,8 @@ class csimp_fn {
|
|||
// Example: `fun {a} => ReaderT.pure`
|
||||
if (!is_join_point_def && !top) {
|
||||
expr new_e = eta_reduce(e);
|
||||
if (is_app(new_e) && !is_constructor_app(env(), new_e) && !is_proj(new_e) && !is_cases_on_app(env(), new_e) && !is_lc_unreachable_app(new_e))
|
||||
// Remark: we should not eta-reduce auxiliary match applications.
|
||||
if (is_app(new_e) && !is_constructor_app(env(), new_e) && !is_proj(new_e) && !is_matcher_app(env(), new_e) && !is_cases_on_app(env(), new_e) && !is_lc_unreachable_app(new_e))
|
||||
return visit(new_e, true);
|
||||
}
|
||||
buffer<expr> binding_fvars;
|
||||
|
|
|
|||
5
stage0/src/library/compiler/util.h
generated
5
stage0/src/library/compiler/util.h
generated
|
|
@ -204,6 +204,11 @@ inline bool is_matcher(environment const & env, name const & n) {
|
|||
return lean_is_matcher(env.to_obj_arg(), n.to_obj_arg());
|
||||
}
|
||||
|
||||
inline bool is_matcher_app(environment const & env, expr const & e) {
|
||||
expr const & f = get_app_fn(e);
|
||||
return is_constant(f) && is_matcher(env, const_name(f));
|
||||
}
|
||||
|
||||
void initialize_compiler_util();
|
||||
void finalize_compiler_util();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue