Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.
can I give "suggested" values to a quickcheck Gen? like, i want to run a generator, but sort of bias it towards some values.
more generally i have two arbitrary-arity functions and i would like to find a set of arguments for each that make the functions equate
any non-trivial solution here is fine
my current strategy is to generate an arbitrary set of args for the higher-arity one, and then bias the arguments generated for the second function to try to use the values i generated for the first one
it doesn't work very well, i think probably because i am doing an independent sampling from that biased set
Have you considered forAll and oneof or frequency?
yeah, i looked at those. i think my new plan is to write unification
biased sampling has lots of problems it turns out
What kind of problems?
primarily that it doesn't solve the problem
wow! did yall know that the shrink method in Arbitrary is _not_ defined as genericShrink?
it's defined as !!
this explains so much