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

Quickcheck equality test: $Q= #39

Open
copy opened this issue Jul 3, 2016 · 2 comments
Open

Quickcheck equality test: $Q= #39

copy opened this issue Jul 3, 2016 · 2 comments

Comments

@copy
Copy link

copy commented Jul 3, 2016

I think this would be a useful addition, following the existing pattern. A quick glance at containers reveals that equality tests are not an uncommon use of $Q.

@c-cube
Copy link
Collaborator

c-cube commented Jul 4, 2016

That would be interesting, indeed. I don't have the time right now, and some details need to be settled first:

  • syntax
  • where should the equality predicate be specified?

@copy
Copy link
Author

copy commented Jul 5, 2016

That would be interesting, indeed. I don't have the time right now, and some details need to be settled first:

Cool, I might give this a try then. Regarding syntax, the syntax for equality tests is <lhs> <rhs> and the syntax for Quickcheck tests is <generator> (fun <generated value> -> <statement>), so the following seems the most obvious approach:

<generator> (fun <generated value> -> <lhs>) (fun <generated value> -> <rhs>)

Regarding equality predicate, I'd suggest adding it to the header (the same way the printer is set).

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

2 participants