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 boolean functions not short circuiting #84

Merged
merged 3 commits into from
Jan 10, 2022
Merged

Fix boolean functions not short circuiting #84

merged 3 commits into from
Jan 10, 2022

Conversation

TotallyNotChase
Copy link
Collaborator

@TotallyNotChase TotallyNotChase commented Jan 10, 2022

My bad, I messed up the original implementation. Should be fixed now.

pand and por (essentially synonyms of #&& and #||) were not short circuiting due to top level usage of pif'. Caught by checking traces.

Plutarch/Bool.hs Outdated Show resolved Hide resolved
@L-as L-as requested a review from srid January 10, 2022 17:12
Plutarch/Bool.hs Show resolved Hide resolved
examples/Main.hs Outdated Show resolved Hide resolved
examples/Main.hs Outdated Show resolved Hide resolved
@L-as L-as merged commit 3c10d3b into master Jan 10, 2022
@srid
Copy link
Member

srid commented Jan 10, 2022

I overlooked something: we have another set of boolean tests here:

https://github.com/Plutonomicon/plutarch/blob/acc1b0a3be62c847aade9cf331aec6a6ac281592/examples/Main.hs#L148-L160

@L-as
Copy link
Member

L-as commented Jan 10, 2022

lol

@TotallyNotChase TotallyNotChase deleted the fix-booleans branch January 11, 2022 11:57
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.

3 participants