Running properties that do not draw any random values only once

Simon Hengel sol at typeful.net
Wed Apr 11 19:58:46 BST 2012


Hi Nick,

> That's a good idea. It's possible to get this behaviour by looking at
> the type of the property. If it has type Bool rather than a function
> type, then it only needs to be tested once. I've just pushed a patch
> that does exactly this:
>    > quickCheck (\x -> even x || odd x)
>    +++ OK, passed 100 tests.
>    > quickCheck (even 2)
>    +++ OK, passed 1 tests.

This is already pretty awesome, especially as it works for results
constructed with MkResult, too.

But it does not work for monadic properties, yet.  Do you think it would
be possible to extend it to that?

Cheers,
Simon



More information about the QuickCheck mailing list