[Haskell-cafe] Generating random arguments for a function

Stephen Tetley stephen.tetley at gmail.com
Sun Jan 13 10:45:08 CET 2013


Yes - I was just checking the first QuickCheck paper to see how the
authors did this.

You would need a new type class that works like `Testable` and the
versions of associated machinery `forAll` and `evaluate` to unroll
function application.


On 13 January 2013 09:28, Roman Cheplyaka <roma at ro-che.info> wrote:

>
> This can be done with relatively simple type class hackery. In fact,
> QuickCheck already does that in order to generate arguments and print
> them in case of failure.
>
> Roman



More information about the Haskell-Cafe mailing list