The commoning in #754 makes it extremely hard to grok. This moves towards understanding what should and can be shared. On the way, some observations:
Inconsistent handling of Lam adds complexity. Let's keep it consistent, and if it's really important that build{if} lifts to if{build} in one rule, make a hyper-specific rule (or a compound rule) that does it.
The current "return True" in the "speculation" checker appears to fail unsafe?
Mixing child indices and subexprs_no_binds suggests to me that a case-by-case analysis as performed in the comments might well be more maintainable.
The commoning in #754 makes it extremely hard to grok. This moves towards understanding what should and can be shared. On the way, some observations:
Inconsistent handling of
Lam
adds complexity. Let's keep it consistent, and if it's really important that build{if} lifts to if{build} in one rule, make a hyper-specific rule (or a compound rule) that does it.The current "return True" in the "speculation" checker appears to fail unsafe?
Mixing child indices and subexprs_no_binds suggests to me that a case-by-case analysis as performed in the comments might well be more maintainable.