We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
wrap
This excerpt:
def main(): with IO: x <- wrap(1) return wrap(wrap(2))
Should be desugaring to
(main) = (IO/bind (IO/wrap 1) λa (a λ* (IO/wrap (IO/wrap 2))))
Instead it desugars into
(main) = (IO/bind (IO/wrap 1) λa (a λb let {c d} = b; λ* (c (d 2)) IO/wrap))
wrap is seen as a free variable, so it gets applied in a deferred way as well as duplicated if it's used more than once.
We need to first substitute the wrap and only then desugar the bind.
Bend commit 270f39c
No response
The text was updated successfully, but these errors were encountered:
developedby
Successfully merging a pull request may close this issue.
Reproducing the behavior
This excerpt:
Should be desugaring to
Instead it desugars into
wrap
is seen as a free variable, so it gets applied in a deferred way as well as duplicated if it's used more than once.We need to first substitute the
wrap
and only then desugar the bind.System Settings
Bend commit 270f39c
Additional context
No response
The text was updated successfully, but these errors were encountered: