22 void enter()
override;
38 auto [entry, inserted] = old2wrapper_.emplace(def,
nullptr);
39 auto& wrapper = entry->second;
41 wrapper = w.mut_lam(def->
type()->as<
Pi>());
42 wrapper->app(
false, def, wrapper->
var());
44 wrapper_.emplace(wrapper);
54 std::unique_ptr<Scope> scope_;
Ref var(nat_t a, nat_t i)
Performs η-expansion: f -> λx.f x, if f is a Lam with more than one user and does not appear in calle...
An optimizer that combines several optimizations in an optimal way.
A dependent function type.
Inherit from this class using CRTP, if your Pass does not need state and a fixed-point iteration.
Helper class to retrieve Infer::arg if present.
const Def * call(Id id, Args &&... args)
const App * rewrite_callee(const App *app)
void enter() override
Invoked just before Pass::rewriteing PassMan::curr_mut's body.
const App * rewrite_arg(const App *app)
ClosConvPrep(PassMan &man, EtaExp *eta_exp)
Ref eta_wrap(Ref def, attr a)
Ref rewrite(Ref) override
bool from_outer_scope(Ref lam)
bool from_outer_scope(Lam *lam)
GIDMap< const Def *, To > DefMap
GIDSet< const Def * > DefSet