-
-
Notifications
You must be signed in to change notification settings - Fork 131
Adds monad laws and a tool to check them #543
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
Conversation
Ok, it is better to switch to https://hypothesis.readthedocs.io/en/latest/data.html#hypothesis.strategies.builds and create custom strategies for our internal types. We would need https://hypothesis.readthedocs.io/en/latest/data.html#hypothesis.strategies.register_type_strategy for it. |
I kindly ask @Zac-HD to help me with reviewing Here they are:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is about all I have time for, but nothing stands out as problematic. Good luck!
@Zac-HD Thanks a lot for your help! 👍 |
Codecov Report
@@ Coverage Diff @@
## master #543 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 77 81 +4
Lines 1600 1765 +165
Branches 103 122 +19
==========================================
+ Hits 1600 1765 +165
Continue to review full report at Codecov.
|
Co-authored-by: Zac Hatfield-Dodds <[email protected]>
Tada! 🎉
TODOs for later:
hypothesis
to dev dependenciescontrib.hypothesis
check_all_laws
SupportsEquality
.equals()
equals
to all containers that can be comparedcheck_all_laws
.laws()
method resolution for different typestypesafety/test_interfaces/test_iterable/test_inheritance.yml
IOBasedN
testsNew laws to implement:
AltableN
must have the same laws asMappableN
.from_failure
has a law: https://wiki.haskell.org/Typeclassopedia#MonadFailAsyncFutureN
hasidempotence
lawReaderBasedN
must be pureCloses #533
Closes #564
Closes #563
Closes #541
Closes #542