Skip to content

Draft: Give a better implementation for (*>) #546

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

L0neGamer
Copy link

@L0neGamer L0neGamer commented May 19, 2025

The default implementation of (*>) uses (<*>) which tries to perform each branch in parallel. However, since we only get the value from the right argument, we should just return that argument.

I don't implement (>>) similarly due to my attempts with haskell/core-libraries-committee#333, but if that proposal falls through I'll be back.

@L0neGamer L0neGamer changed the title encode a better *> operator Give a better implementation for (*>) May 19, 2025
@ocharles
Copy link
Contributor

This doesn't look sound - what if I'm using GenT State? You're not going to run the left potentially-stateful computation at all!

@L0neGamer
Copy link
Author

Damn, you've a point... I'll have another go

@L0neGamer L0neGamer changed the title Give a better implementation for (*>) Draft: Give a better implementation for (*>) May 19, 2025
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