nick8325 / quickcheck

Automatic testing of Haskell programs.
Other
706 stars 119 forks source link

`Arbitrary` instance for `Data.List.NonEmpty.NonEmpty` #411

Open andreasabel opened 5 days ago

andreasabel commented 5 days ago

Would be great if we had Arbitrary instances for all the relevant data types of base, including non-empty lists which are nowadays quite standard. (The instance for Data.List.NonEmpty.NonEmpty would be trivial to add with an instance for wrapper NonEmptyList already existing.)

ATTN: @MaximilianAlgehed

P.S.: currently this instance is supplied by package quickcheck-instances https://github.com/haskellari/qc-instances . Where is the demarkation line? How is it defined which instances should be in QuickCheck?

MaximilianAlgehed commented 5 days ago

The demarkation line between quickcheck and quickcheck-instances is a point of some discussion. I would like QuickCheck to supply every instance that's in base, but for legacy reasons that's a bit controversial and causes some headaches.

My goal is to figure out a way to get to the point where all base versions after some arbitrary (current?) version are supported directly by QuickCheck. That would at least share the burden a bit as a first step, and then we can move to include all supported base versions and all compatibility packages for e.g. semigroups.