[Haskell-cafe] Test.QuickCheck: generate

David Menendez dave at zednenem.com
Wed Oct 7 23:57:09 EDT 2009


On Wed, Oct 7, 2009 at 8:29 PM, Michael Mossey <mpm at alumni.caltech.edu> wrote:
> In Test.QuickCheck, the type of 'generate' is
>
> generate :: Int -> StdGen -> Gen a -> a
>
> I can't find docs that explain what the Int does. Some docs are here:
>
> <http://www.haskell.org/ghc/docs/latest/html/libraries/QuickCheck/Test-QuickCheck.html>

Judging by the source code, the integer is the upper bound for the
size parameter. If you are generating a list, for example, it gives
the maximum size of the list.

-- 
Dave Menendez <dave at zednenem.com>
<http://www.eyrie.org/~zednenem/>


More information about the Haskell-Cafe mailing list