Skip to content

Fix consumed semantics #239

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

Merged
merged 3 commits into from
Mar 7, 2025

Conversation

natefaubion
Copy link
Contributor

@natefaubion natefaubion commented Mar 6, 2025

This effectively treats the consumed flag as a monoid appended on each sequential action (ie, Writer). This means it can always be a local decision so low-level combinators don't need to consult the previous state.

Fixes #235


Checklist:

  • Added the change to the changelog's "Unreleased" section with a link to this PR and your username
  • Linked any existing issues or proposals that this pull request should close
  • Updated or added relevant documentation in the README and/or documentation directory
  • Added a test for the contribution (if applicable)

This effectively treats the consumed flag as a monoid appended on
each sequential action (ie, Writer). This means it can always be
a local decision so low-level combinators don't need to consult
the previous state.

Fixes purescript-contrib#235
@natefaubion
Copy link
Contributor Author

This also reverts #237 since it's no longer necessary.

@jamesdbrock jamesdbrock merged commit 6e23d3b into purescript-contrib:main Mar 7, 2025
1 check passed
@jamesdbrock
Copy link
Member

Nice, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

optional doesn't propagate fail when used with <|>
2 participants