<div dir="auto"><div dir="auto">data Foo a = Leaf a | Node [Foo a]</div><div dir="auto"><br></div>Without the size parameter, it's a bit tricky to control the distribution to avoid generating extremely large trees. I certainly agree, however, that the size parameter is an ugly and ill-specified hack.</div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jun 14, 2018, 4:20 PM Petr Pudlák <<a href="mailto:petr.mvd@gmail.com">petr.mvd@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi everyone,<div><br></div><div>I'd like to better understand the principles behind the 'size' parameter. Looking at quickCheckWithResult [1], its computation seems to be somewhat non-trivial, or even arbitrary. As far as I understand it, the size is varied throughout tests, increasing from small to larger values. I see two main purposes:</div><div><br></div><div>- Test on smaller as well as larger values. But with generators having proper distribution of values, this should happen anyway, just as if we had a constant, larger 'size' parameter.</div><div>- Starting with smaller sizes allows to find smaller count-examples first. But with shrinking, it doesn't matter that much, big counter-examples are shrunk to smaller ones anyway in most cases.</div><div><br></div><div>So is this parameter actually necessary? Would anything change considerably if it was dropped?</div><div><br></div><div>Thanks,</div><div>Petr</div><div><br></div><div>[1] <a href="http://hackage.haskell.org/package/QuickCheck-2.11.3/docs/src/Test-QuickCheck-Test.html#quickCheckWithResult" target="_blank" rel="noreferrer">http://hackage.haskell.org/package/QuickCheck-2.11.3/docs/src/Test-QuickCheck-Test.html#quickCheckWithResult</a></div></div>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div>