Skip to content

Property tests for class laws#1191

Merged
meooow25 merged 6 commits intohaskell:masterfrom
meooow25:check-laws
Apr 3, 2026
Merged

Property tests for class laws#1191
meooow25 merged 6 commits intohaskell:masterfrom
meooow25:check-laws

Conversation

@meooow25
Copy link
Copy Markdown
Contributor

Use quickcheck-classes-base to test that our instances of common classes are lawful.

Closes #264

Use quickcheck-classes-base to test that our instances of common
classes are lawful.
@meooow25
Copy link
Copy Markdown
Contributor Author

Error: [Cabal-9341]
Failed to find the installed unit 'containers-tests-0-inplace-test-utils' in package database stack.

That's a weird error. The only relevant thing I can find is haskell/cabal#10046.

@meooow25 meooow25 merged commit d3cedea into haskell:master Apr 3, 2026
17 checks passed
@meooow25 meooow25 deleted the check-laws branch April 3, 2026 20:05
Comment on lines +69 to +70
-- Requires Arbitrary1 on GHC <8.6, skip
#if __GLASGOW_HASKELL__ >= 806
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry to intrude; I have two questions here.

Firstly, is 806 the correct invocation for 8.6?

Secondly, is the arbitrary1 requirement really a GHC version restriction, or should it be some kind of package version restriction? IE should this be "quickcheck version where arbitrary1 exists" or similar instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Firstly, is 806 the correct invocation for 8.6?

Yes, see https://downloads.haskell.org/ghc/9.14.1/docs/users_guide/phases.html#standard-cpp-macros

Secondly, is the arbitrary1 requirement really a GHC version restriction, or should it be some kind of package version restriction? IE should this be "quickcheck version where arbitrary1 exists" or similar instead?

It is indeed a restriction on GHC version set by quickcheck-classes-base:

Copy link
Copy Markdown
Contributor

@L0neGamer L0neGamer Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wonderful, thanks for answering my questions

@meooow25 meooow25 restored the check-laws branch April 5, 2026 18:07
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

Successfully merging this pull request may close these issues.

Use checkers for testing

2 participants