<div dir="ltr"><div style class="markdown-here-wrapper" id="markdown-here-wrapper-49019"><p style="margin:1.2em 0px!important">There’s a branch adding support for <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">Generic</code> deriving of <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">Arbitrary</code>, more than a year old.  I always wondered why it was never merged into master and released on Hackage.</p>


</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Nov 20, 2013 at 9:02 AM, José Pedro Magalhães <span dir="ltr"><<a href="mailto:jpm@cs.uu.nl" target="_blank">jpm@cs.uu.nl</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hello,<br><br></div><a href="http://hackage.haskell.org/package/regular-0.3.4" target="_blank">regular</a> has a generic implementation of Arbitrary that even lets you specify size and<br>

give each constructor a particular frequency (see <a href="http://hackage.haskell.org/package/regular-extras-0.2.2/docs/Generics-Regular-Functions-Arbitrary.html" target="_blank">Generics.Regular.Functions.Arbitrary).</a><br>



</div>If you find it useful, I'm sure it can be ported to the <a href="http://hackage.haskell.org/package/generic-deriving" target="_blank">generic-deriving</a> package, so that it<br>works with GHC.Generics (or maybe to some generic-deriving-extras package to avoid<br>



</div>making generic-deriving depend on QuickCheck).<br><br><br></div>Cheers,<br>Pedro<br></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Wed, Nov 20, 2013 at 6:57 AM, Alexander Solla <span dir="ltr"><<a href="mailto:alex.solla@gmail.com" target="_blank">alex.solla@gmail.com</a>></span> wrote:<br>



</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">I am looking for a QuickCheck-like test framework which exposes data generators (like QuickCheck's Arbitrary class) with Generic defaults.<div>



<br></div><div>I have seen that SmallCheck's Serial class has Generic defaults, but it isn't particularly good for my purpose (I'd like to use the generator to populate deeply nested data types, and SmallCheck's generator requires computing a few million values before I get any interesting ones)  Something "random" would be more useful for my purpose.</div>




<div><br></div><div>I know that the plan depends on my vaguely abusing the test-case generator, but I plan on doing some testing anyway, so I figured I should reuse the instance.</div><div><br></div><div>That said, I'd be willing to use any random value type class with Generic-default instances.</div>




<div><br></div><div>Does anybody have any suggestions?</div></div>
<br></div></div><div class="im">_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></div></blockquote></div><br></div>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br></div>