[Haskell-cafe] Quickcheck

graham at fatlazycat.com graham at fatlazycat.com
Tue Nov 13 23:05:03 CET 2012


Thanks, that handy and works for my test.



Any idea why the implication does not ???





On Tue, Nov 13, 2012, at 09:59 PM, Ozgur Akgun wrote:

hi,



On 13 November 2012 21:52, <[1]graham at fatlazycat.com> wrote:

prop_something x y = .......do blah with positive integers

  ==> x > 0 && y > 0


quickcheck provides a few nice new types for such cases. try:



prop_something (Positive x) (Positive y) = ...



this way qc only generates positive numbers, instead of generating and
discarding some.

hth,

--
Ozgur Akgun

References

1. mailto:graham at fatlazycat.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20121113/58b264bb/attachment.htm>


More information about the Haskell-Cafe mailing list