[Haskell-beginners] QuickCheck

Lee Duhem lee.duhem at gmail.com
Sat May 23 23:21:57 EDT 2009


On Sun, May 24, 2009 at 11:08 AM, Thomas Friedrich <info at suud.de> wrote:
> Hallo everyone,
>
> I am currently playing around with the QuickCheck library.  I came across
> the
>
> Test.QuickCheck.Batch
>
> module a couple of times.  I don't seem to have this module installed?
>  Where can I get it and how do I install it?

If you use GHC, you already have it, try
    ghc-pkg list | grep -i quickcheck

>
> I also would like to invoke the following in ghci.
>
> generate 10 (System.Random.mkStdGen 1) arbitrary :: [Int]
>
> However, the function `generate` doesn't get imported when importing
> QuickCheck, and I just cannot find out which module this one would be in.

In GHCi, you need import Test.QuickCheck or Debug.QuickCheck before
you use generate.

>
> I came to the conclusion that `generate` is just not the best word for a
> google search :(

Just check the document of GHC libraries:
http://www.haskell.org/ghc/docs/latest/html/libraries/index.html
http://www.haskell.org/ghc/docs/latest/html/libraries/QuickCheck/Test-QuickCheck.html

lee


More information about the Beginners mailing list