Skip to content
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

Main can be unexpectedly lazy when it expands into a function with combinators #642

Closed
developedby opened this issue Jul 24, 2024 · 1 comment
Assignees
Labels
bug Something isn't working compilation Compilation of terms and functions to HVM

Comments

@developedby
Copy link
Member

Reproducing the behavior

main = my_fn
my_fn = (@x x (ctr 1 2))
ctr = @a @b @x (x a b)

We expect this program to reduce to @a (a 1 2), but since the application is a combinator it actually gets extracted before expanding main, leading to the result being (ctr 1 2) instead.

System Settings

Bend commit 060239a
HVM: v2.0.21

Additional context

No response

@developedby developedby added bug Something isn't working compilation Compilation of terms and functions to HVM labels Jul 24, 2024
@developedby developedby self-assigned this Jul 24, 2024
github-merge-queue bot pushed a commit that referenced this issue Jul 24, 2024
…nt-expanded-when-theyre-inside-lists

#642 #643 Make `expand_main` deal with more cases (extracted combinators, constructors)
@developedby
Copy link
Member Author

Closed by #644

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compilation Compilation of terms and functions to HVM
Projects
None yet
Development

No branches or pull requests

1 participant