Closed sjakobi closed 4 years ago
Shameless plug: generic-random requires you to specify a weight for every constructor (disclaimer: I'm the author, and there are a few other packages in the same space on Hackage).
Props for the lovely docs, @Lysxia! :+1: I'll give generic-random
a try.
Maybe QuickCheck
should even recommend generic-random
somewhere?
there are a few other packages in the same space on Hackage
Can you give me some pointers?
The alternatives I know of only implement uniform distributions (which makes them that much simpler to their benefit):
I have a large sum type that often gets new constructors. I want to be sure that whenever I add a new constructor, I also update the
Arbitrary
instance to generate the new constructor.There is a StackOverflow question offering some ad-hoc solutions for this problem. It's from 2014 though, so I'm wondering what the recommended solution is today.