Teach the PIR beta pass to handle multiple arguments at once #4372
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This has bothered me for a while. We rely on this to turn function
applications into let-bindings so that we can inline them, but because
of the way it was written it could only ever do this for at most one
argument at a time! So we could only fully-inline a function of arity N
with N rounds of the simplifier! Terrible!
Now it handles any number at once.
I wrote all the functions for this while working on
#4365, since there we
really need it, since constructors and destructors appear like
multiple function arguments rather than multiple nested
immediately-applied-lambdas. But it applies well here too, so I thought
I'd just do this improvement on the side.
Pre-submit checklist: