-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better lambda normal form #379
Comments
/bounty $150 |
💎 $150 bounty • ZIOSteps to solve:
Thank you for contributing to zio/izumi-reflect! Add a bounty • Share on socials
|
There are several ways to address this. If someone wishes to work on this, I would advise to apply normalization in the constructor of Alternatively, one might look at the application points of |
💡 @asr2003 submitted a pull request that claims the bounty. You can visit your bounty board to reward. |
Instead of substituting lambda parameters with fake parameters to generate normal form, we should generate normal forms for lambdas in a format that can also be used as their primary form, e.g. given 2 nested lambdas:
λ %0:0/1 → Applicative3[λ %1:0/3, %1:1/3, %1:2/3 → 0:0/1[1:1, 1:2]]
Current normal forms are:
Applicative3[λ %1:0/3, %1:1/3, %1:2/3 → FAKE_0[1:1, 1:2]
0:0/1[FAKE_0, FAKE_1]
Should be:
Applicative3[λ %1:0/3, %1:1/3, %1:2/3 → 0:0/1[1:1, 1:2]]
-1:0/1[0:1/3, 0:2/3]
Where -1 refers to outer context 1 level up, -2 refers to outer context 2 levels up, etc.
The text was updated successfully, but these errors were encountered: