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

implements bifoldable test #62

Merged
merged 1 commit into from
Feb 16, 2022

Conversation

solomon-b
Copy link
Contributor

@solomon-b solomon-b commented Feb 14, 2022

Resolves issue #48. We could reduce the number of type parameters by merging c and m, but I didn't want it to appear that bifoldr f g z t ≡ appEndo (bifoldMap (Endo . f) (Endo . g) t) z requires a monoid on c

Copy link
Member

@sjakobi sjakobi left a comment

Choose a reason for hiding this comment

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

Thanks! :)

Do you have a source for these laws?

src/Test/QuickCheck/Classes.hs Outdated Show resolved Hide resolved
@solomon-b
Copy link
Contributor Author

They come from the Data.Bifoldable haddocks.

There is one more law I forget to include:

bifoldMap f g = bifold . bimap f g

This is only relevant if you have a Bifunctor. Would we put it in a separate test?

@sjakobi
Copy link
Member

sjakobi commented Feb 16, 2022

There is one more law I forget to include:

bifoldMap f g = bifold . bimap f g

This is only relevant if you have a Bifunctor. Would we put it in a separate test?

Yes, we can add this in the style of the existing foldableFunctor test.


Regarding compatibility with GHC 7.10 and 8.0, I'll try to drop support for these soon, so we can merge your PRs without breaking CI.

sjakobi added a commit that referenced this pull request Feb 16, 2022
This is motivated by #61 and #62.
sjakobi added a commit that referenced this pull request Feb 16, 2022
This is motivated by #61 and #62.
@sjakobi
Copy link
Member

sjakobi commented Feb 16, 2022

Could you rebase?

@solomon-b solomon-b force-pushed the feature/bifoldable branch 2 times, most recently from aa65254 to 98f3c1f Compare February 16, 2022 22:21
@solomon-b
Copy link
Contributor Author

Could you rebase?

done!

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.

None yet

2 participants