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

Improve Test Suite #65

Open
andrewthad opened this issue Oct 15, 2018 · 4 comments
Open

Improve Test Suite #65

andrewthad opened this issue Oct 15, 2018 · 4 comments

Comments

@andrewthad
Copy link
Owner

In a discussion about the broken derived Ord instances in GHC 8.6.1:

It's possible that that could have helped prevent it. Although someone would have needed to make sure they have created an eight-constructor data type with a derived Ord instance. But there's no real reason this would need to be inside of GHC. This could even just live in quickcheck-classes's test suite. Currently, I just test numeric types, but we could test a whole host of derived instances and run it against the release candidates and betas.

I'm going to do this.

@chessai
Copy link
Collaborator

chessai commented Dec 22, 2018

Is it possible to inspect all types in scope for their typeclass instances and generate the test cases for that type by matching its instances against those we have Laws for? The first part (discovery) is what i don't know how to do. Perhaps some existing tool does this, or we could parse the output of :info <ty>. I feel like such a tool would be generally useful, as you could give it a haskell project (stack.yml,.cabal,cabal.project, or just a haskell module) and it generates the test cases by passing over the code and looking for datatypes/instances.

@chessai
Copy link
Collaborator

chessai commented Dec 22, 2018

We could probably do what haddock does for gathering the typeclasses or something similar and just using it as inspiration. I dont remember what the datatype for typeclasses is. I don't think this will be that hard.

@chessai
Copy link
Collaborator

chessai commented Dec 22, 2018

We could run into issues related to #74.

@andrewthad
Copy link
Owner Author

I don’t know if you can get all types in scope with template Haskell. Maybe it can do all types exported by a module.

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

2 participants