Re: [Haskell-cafe] HTF Quickcheck

2012-12-18 Thread graham
Are there any libraries that define various common generators ? What would be the cleanest way to define two positive integers below 1000 that are different ? Seems relatively easy with conditionals. Thanks On Tue, Dec 18, 2012, at 07:01 AM, gra...@fatlazycat.com wrote: So what use are

Re: [Haskell-cafe] HTF Quickcheck

2012-12-18 Thread Simon Hengel
On Tue, Dec 18, 2012 at 05:25:41PM +, gra...@fatlazycat.com wrote: Are there any libraries that define various common generators ? What would be the cleanest way to define two positive integers below 1000 that are different ? Seems relatively easy with conditionals. You can still use

Re: [Haskell-cafe] HTF Quickcheck

2012-12-18 Thread graham
Thanks, how does using /= not cause test failures ? Just the sample rate will be high enough ? On Tue, Dec 18, 2012, at 06:04 PM, Simon Hengel wrote: On Tue, Dec 18, 2012 at 05:25:41PM +, gra...@fatlazycat.com wrote: Are there any libraries that define various common generators ? What

[Haskell-cafe] HTF Quickcheck

2012-12-17 Thread graham
Getting test failures, I believe, due to using conditional properties within quickckeck etc [TEST] RecFunSpec:map (test/RecFunSpec.hs:48) Gave up! Passed only 20 tests. *** Failed! (2ms) Is there a way for HTF/Quickcheck to specify these are not failed i.e. only fail if there is an actual error

Re: [Haskell-cafe] HTF Quickcheck

2012-12-17 Thread Roman Cheplyaka
Unfortunately, I don't know the answer to your question. However, if you don't find a solution, I suggest using SmallCheck instead of QuickCheck — it works better when you have many unsuitable cases. https://github.com/feuerbach/smallcheck/wiki/Comparison-with-QuickCheck As far as I know,

Re: [Haskell-cafe] HTF Quickcheck

2012-12-17 Thread Simon Hengel
On Mon, Dec 17, 2012 at 03:50:32PM +, gra...@fatlazycat.com wrote: Getting test failures, I believe, due to using conditional properties within quickckeck etc [TEST] RecFunSpec:map (test/RecFunSpec.hs:48) Gave up! Passed only 20 tests. *** Failed! (2ms) Is there a way for

Re: [Haskell-cafe] HTF Quickcheck

2012-12-17 Thread Simon Hengel
On Mon, Dec 17, 2012 at 06:04:15PM +0200, Roman Cheplyaka wrote: Unfortunately, I don't know the answer to your question. However, if you don't find a solution, I suggest using SmallCheck instead of QuickCheck — it works better when you have many unsuitable cases.

Re: [Haskell-cafe] HTF Quickcheck

2012-12-17 Thread graham
So what use are conditional properties meant to be used for ?? If you just want 2 integers that are not equal, it would seem a lot simpler to do this as a conditional rather than constructing some pair in an arbitrary instance ?!? Thanks On Mon, Dec 17, 2012, at 11:20 PM, Simon Hengel wrote: