<br>&gt; which makes me think that Arbitrary isn&#39;t the right set of<br><div class="gmail_quote"><div>&gt; abstractions for controlling coverage of the value space.</div><div><br></div><div>I agree with you Wren. I think what is needed is a library for expressing the distribution of values for a given type.  </div>
<div><br></div><div>I can see several ways of specifying distributions, directly (exponential, normal, etc), qualitative constraints (a tuple where each value is less then the next), constraints on moments (MaxEnt), etc, there are many ways that are not mutually exclusive.</div>
<div><br></div><div>There are other ways to improve quickcheck. </div><div><br></div><div><div>Writing arbitrary instance could be made more declarative. The process of describing an indicator function that fully determines the set of values that are valid for my type, and writing the sequence of steps necessary to make the function efficient could be separated.</div>
<div><br></div><div>Combinatorial species and symbolic combinatorics are too possibilities to simplify the creation of arbitrary functions. There might be way go from list of functions to an generator. Something like </div>
<div><br></div><div>make_arb :: [a -&gt; Bool] -&gt; Gen a</div></div><div><br></div><div>That is psuedo code, since you can&#39;t reify a function. But that would be the idea, although I don&#39;t think it would work in all cases.</div>
<div><br></div><div>Also, the current quickcheck workflow is to run it until a example of valid input fails a test. When this happens the example should be used in a regression. Creating unit tests automatically from failed quickcheck cases would be a time saver. </div>
<div><br></div><div>Additionally the right type mutation of testing would be a great addition to quickcheck. </div><div><br></div><div>-Jonathan</div></div>