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

Test some distributivity laws #38

Merged
merged 1 commit into from
Nov 4, 2020
Merged

Test some distributivity laws #38

merged 1 commit into from
Nov 4, 2020

Conversation

johnynek
Copy link
Collaborator

@johnynek johnynek commented Nov 4, 2020

I had naively hoped a strong distributive law would hold. This cannot hold for parsers without total backtracking and as such seems like it was perhaps erroneously added to cats Alternative law testing. I added a comment linking to some past difficulties cats had with a related issue and also to a discussion that some Haskell Alternative instances are not distributive.

cc @non

Copy link
Contributor

@non non left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I think it's great to be explicit about the kind of distributivity we can (or can't) have.

@johnynek johnynek merged commit b88d23c into main Nov 4, 2020
@johnynek johnynek deleted the oscar/test_weak_distrib branch November 4, 2020 21:39
@johnynek johnynek mentioned this pull request Nov 5, 2020
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