<font face="verdana,sans-serif">Your implication is backwards. ==&gt; is read &quot;implies&quot;</font><div><font face="verdana,sans-serif"><br></font></div><div><font face="verdana,sans-serif">So your way has &quot;do blah with positive integers&quot; implies &quot;x &gt; 0 &amp;&amp; y &gt; 0&quot;. That&#39;s backwards.</font></div>

<div><font face="verdana,sans-serif"><br></font></div><div><font face="verdana,sans-serif">Try prop_something x y = x &gt; 0 &amp;&amp; y &gt; 0 ==&gt; ... do blah with positive integers</font></div><div><font face="verdana,sans-serif"><br>

</font></div><div><font face="verdana,sans-serif">  - Clark</font></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Nov 13, 2012 at 4:52 PM,  <span dir="ltr">&lt;<a href="mailto:graham@fatlazycat.com" target="_blank">graham@fatlazycat.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks, will try them both. With regards to the implication I assume<br>
it&#39;s just regarded as one property test ?<br>
<br>
To get two values greater than zero I have something like<br>
<br>
prop_something x y = .......do blah with positive integers<br>
  ==&gt; x &gt; 0 &amp;&amp; y &gt; 0<br>
<br>
But my test fails as it appears to be injecting a negative number and<br>
the test fails. But the implication does not cause the failed test to be<br>
ignored.<br>
<br>
Must be missing something ???<br>
<br>
Thanks<br>
<div class="HOEnZb"><div class="h5"><br>
On Mon, Nov 12, 2012, at 10:00 PM, Iustin Pop wrote:<br>
&gt; On Mon, Nov 12, 2012 at 10:14:30PM +0100, Simon Hengel wrote:<br>
&gt; &gt; On Mon, Nov 12, 2012 at 07:21:06PM +0000, <a href="mailto:graham@fatlazycat.com">graham@fatlazycat.com</a> wrote:<br>
&gt; &gt; &gt; Hi,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Trying to find some good docs on QuickCheck, if anyone has one ?<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Been scanning what I can find, but a question.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; What would be the best way to generate two different/distinct integers ?<br>
&gt; &gt;<br>
&gt; &gt; I would use Quickcheck&#39;s implication operator here:<br>
&gt; &gt;<br>
&gt; &gt;     quickCheck $ \x y -&gt; x /= (y :: Int) ==&gt; ...<br>
&gt;<br>
&gt; That&#39;s good, but it only eliminates test cases after they have been<br>
&gt; generated. A slightly better (IMHO) version is to generate &quot;correct&quot;<br>
&gt; values in the first place:<br>
&gt;<br>
&gt;     prop_Test :: Property<br>
&gt;     prop_Test =<br>
&gt;         forAll (arbitrary::Gen Int) $ \x -&gt;<br>
&gt;         forAll (arbitrary `suchThat` (/= x)) $ \y -&gt;<br>
&gt;         …<br>
&gt;<br>
&gt; regards,<br>
&gt; iustin<br>
<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>
</div></div></blockquote></div><br></div>