7const Def* EtaRedPhase::rewrite(
const Def* old_def) {
8 if (
auto lam = old_def->isa<
Lam>()) {
9 if (
auto callee = lam->eta_reduce())
return todo_ =
true, rewrite(callee);
void transfer_external(Def *to)
const Def * type() const noexcept
Yields the "raw" type of this Def (maybe nullptr).
const Def * rewrite_imm_Var(const Var *) final
void rewrite_external(Def *) final
bool todo_
Set to true to indicate that you want to rerun all Phasees in current your fixed-point PhaseMan.
World & new_world()
Create new Defs into this.
virtual const Def * rewrite(const Def *)
const Def * var(const Def *type, Def *mut)