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

Laws for MonadFilter and MonadCombine #135

Closed
non opened this issue Feb 8, 2015 · 6 comments
Closed

Laws for MonadFilter and MonadCombine #135

non opened this issue Feb 8, 2015 · 6 comments

Comments

@non
Copy link
Contributor

non commented Feb 8, 2015

Both of these have laws that we aren't currently testing.

The important one is MonadFilter since it introduces a new method (empty) which isn't participating in any of its "inherited" laws. But there are also laws for how empty and combine interact with flatMap which we should be testing for MonadCombine as well.

See #125 for more discussion.

@xuwei-k
Copy link
Contributor

xuwei-k commented Feb 9, 2015

cats.MonadFilter = MonadZero ?

https://wiki.haskell.org/MonadPlus_reform_proposal

@fthomas
Copy link
Member

fthomas commented Feb 19, 2015

I'll work on this one.

@mpilquist
Copy link
Member

@fthomas It might be good to do #212 first because MonadCombineLaws depend on AlternativeLaws.

@mpilquist
Copy link
Member

Oh, and in order to write AlternativeLaws, you'll need the soon to be merged MonoidKLaws

@fthomas
Copy link
Member

fthomas commented Feb 19, 2015

Thanks for the hint. I'll postpone the MonadCombineLaws then and just submit a PR for the MonadFilterLaws.

@fthomas
Copy link
Member

fthomas commented Apr 23, 2015

This should be fixed by #198, #215, and #223.

@fthomas fthomas closed this as completed Apr 23, 2015
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

No branches or pull requests

4 participants