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

Small has no CoArbitrary instance #360

Open
andreasabel opened this issue Jul 25, 2023 · 1 comment · May be fixed by #372
Open

Small has no CoArbitrary instance #360

andreasabel opened this issue Jul 25, 2023 · 1 comment · May be fixed by #372

Comments

@andreasabel
Copy link

When trying to use $allProperties on a prop_Foo that uses type Small Int:

No instance for ‘CoArbitrary (Small Int)’
        arising from a use of ‘property’

Is there a reason why Small cannot have a CoArbitrary instance?

andreasabel added a commit to agda/agda that referenced this issue Jul 25, 2023
I wondered what to use for the polymorphic types, and settled for `Word8`.
One would think that it generates more collisions than a large type like `Int` or `Integer`.
Not tested.

I also tried `Small Int` but this does not have a `CoArbitrary` instance.
Asked upstream about this:
- nick8325/quickcheck#360
@MaximilianAlgehed
Copy link
Collaborator

@nick8325 unless there is some reason for this that I can't make sense of I'm going to add instances of CoArbitrary and Function for the types in Test.QuickCheck.Modifiers.

@MaximilianAlgehed MaximilianAlgehed linked a pull request Mar 21, 2024 that will close this issue
JobPetrovcic pushed a commit to JobPetrovcic/agda that referenced this issue Apr 12, 2024
I wondered what to use for the polymorphic types, and settled for `Word8`.
One would think that it generates more collisions than a large type like `Int` or `Integer`.
Not tested.

I also tried `Small Int` but this does not have a `CoArbitrary` instance.
Asked upstream about this:
- nick8325/quickcheck#360
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants