haskell-checkers / checkers

Check properties on standard classes and data structures
Other
79 stars 13 forks source link

implements bifoldable test #62

Closed solomon-b closed 2 years ago

solomon-b commented 2 years ago

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

solomon-b commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

Could you rebase?

solomon-b commented 2 years ago

Could you rebase?

done!