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

allow tasty-quickcheck == 0.11.* #340

Open
sternenseemann opened this issue Jan 11, 2025 · 1 comment · May be fixed by #342
Open

allow tasty-quickcheck == 0.11.* #340

sternenseemann opened this issue Jan 11, 2025 · 1 comment · May be fixed by #342

Comments

@sternenseemann
Copy link

sternenseemann commented Jan 11, 2025

For cborg, I've successfully built and executed the test suite with GHC 9.8.4/ tasty-quickcheck-0.11.

serialise fails with:

[13 of 14] Compiling Tests.Serialise  ( tests/Tests/Serialise.hs, dist/build/tests/tests-tmp/Tests/Serialise.o )

tests/Tests/Serialise.hs:283:9: error: [GHC-43085]
    • Overlapping instances for Arbitrary (Vector.Primitive.Vector Int)
        arising from a use of ‘mkTest’
      Matching instances:
        instance (Vector.Primitive.Prim a, Arbitrary a) =>
                 Arbitrary (Vector.Primitive.Vector a)
          -- Defined in ‘Test.QuickCheck.Instances.Vector’
        instance (Vector.Primitive.Prim a, Arbitrary a) =>
                 Arbitrary (Vector.Primitive.Vector a)
          -- Defined at tests/Tests/Orphanage.hs:198:10
    • In the expression: mkTest (T :: T (Vector.Primitive.Vector Int))
      In the second argument of ‘testGroup’, namely
        ‘[mkTest (T :: T ()), mkTest (T :: T Bool), mkTest (T :: T Int),
          mkTest (T :: T Int8), ....]’
      In the expression:
        testGroup
          "Simple instance invariants"
          [mkTest (T :: T ()), mkTest (T :: T Bool), mkTest (T :: T Int),
           mkTest (T :: T Int8), ....]
    |
283 |       , mkTest (T :: T (Vector.Primitive.Vector Int))
    |         ^^^^^^
9999years added a commit to 9999years/cborg that referenced this issue Feb 13, 2025
Closes well-typed#340

Fixes a build error due to overlapping instances:

```
[13 of 14] Compiling Tests.Serialise  ( tests/Tests/Serialise.hs, dist/build/tests/tests-tmp/Tests/Serialise.o )

tests/Tests/Serialise.hs:283:9: error: [GHC-43085]
    • Overlapping instances for Arbitrary (Vector.Primitive.Vector Int)
        arising from a use of ‘mkTest’
      Matching instances:
        instance (Vector.Primitive.Prim a, Arbitrary a) =>
                 Arbitrary (Vector.Primitive.Vector a)
          -- Defined in ‘Test.QuickCheck.Instances.Vector’
        instance (Vector.Primitive.Prim a, Arbitrary a) =>
                 Arbitrary (Vector.Primitive.Vector a)
          -- Defined at tests/Tests/Orphanage.hs:198:10
    • In the expression: mkTest (T :: T (Vector.Primitive.Vector Int))
      In the second argument of ‘testGroup’, namely
        ‘[mkTest (T :: T ()), mkTest (T :: T Bool), mkTest (T :: T Int),
          mkTest (T :: T Int8), ....]’
      In the expression:
        testGroup
          "Simple instance invariants"
          [mkTest (T :: T ()), mkTest (T :: T Bool), mkTest (T :: T Int),
           mkTest (T :: T Int8), ....]
    |
283 |       , mkTest (T :: T (Vector.Primitive.Vector Int))
    |         ^^^^^^
```
@9999years
Copy link

I believe this build failure is due to quickcheck-instances-0.3.32, not tasty-quickcheck-0.11.*

You can see the overlapping instance here:

https://hackage.haskell.org/package/quickcheck-instances-0.3.32/docs/Test-QuickCheck-Instances-Vector.html#v:-36-fArbitraryVector

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 a pull request may close this issue.

2 participants