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

MonadFix #20

Open
treeowl opened this issue Jan 23, 2018 · 4 comments
Open

MonadFix #20

treeowl opened this issue Jan 23, 2018 · 4 comments

Comments

@treeowl
Copy link

treeowl commented Jan 23, 2018

In my experience with Data.Sequence and especially Data.Tree, I have learned that it is extremely difficult to test that a MonadFix instance obeys the laws. It also tends to be very difficult to prove that the laws hold. It would therefore be very helpful if checkers could provide some assistance. It's tricky because the functions passed to mfix need to be lazy, and their detailed strictness needs to be reflected in certain ways in the results of mfix. I suspect the right approach is to find a way to generate some reasonably large but very well-behaved class of functions, probably with some help from the user.

@conal
Copy link
Collaborator

conal commented Jan 23, 2018

Thanks for the suggestion and insights. I'm unlikely to take initiative on this issue, but maybe someone else will.

@sjakobi
Copy link
Member

sjakobi commented Mar 19, 2019

Note that there's some relevant work in progress at andrewthad/quickcheck-classes#87.

@chessai
Copy link

chessai commented Jun 18, 2019

Yes, this has proven to be extremely difficult, in both quickcheck-classes and hedgehog-classes.

@chessai
Copy link

chessai commented Jun 18, 2019

I think this paper has some relevant ideas: https://very.science/pdf/StrictCheck.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants