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

[Fix] Properly force enum variants #1835

Merged
merged 2 commits into from
Mar 5, 2024
Merged

[Fix] Properly force enum variants #1835

merged 2 commits into from
Mar 5, 2024

Conversation

yannham
Copy link
Member

@yannham yannham commented Mar 5, 2024

The implementation of deep_seq and force primops haven't been properly updated to handle enum variants, letting them mostly unevaluated. This could in particular let contracts be unexpectedly unevaluated, and also shows unevaluated chunks in the REPL when inputting enum variants, which isn't ideal.

This commit properly forces enum variants.

The implementation of deep_seq and force primops haven't been properly
updated to handle enum variants, letting them mostly unevaluated. This
could in particular let contracts be unexpectedly unevaluated, and also
show unevaluated chunk in the REPL when inputting enum variants there,
which isn't ideal.

This commit properly forces enum variants.
core/tests/integration/inputs/adts/deep_seq_enum.ncl Outdated Show resolved Hide resolved
core/tests/integration/inputs/adts/force_enum.ncl Outdated Show resolved Hide resolved
core/src/eval/operation.rs Show resolved Hide resolved
Co-authored-by: Viktor Kleen <viktor.kleen@tweag.io>
@yannham yannham enabled auto-merge March 5, 2024 15:48
@github-actions github-actions bot temporarily deployed to pull request March 5, 2024 15:51 Inactive
@yannham yannham added this pull request to the merge queue Mar 5, 2024
Merged via the queue into master with commit 72f4a37 Mar 5, 2024
5 checks passed
@yannham yannham deleted the fix/force-enum-variants branch March 5, 2024 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants