[Haskell-beginners] QuickCheck

Thomas Friedrich info at suud.de
Sat May 23 23:25:23 EDT 2009


Hi Lee,

I do have GHC and no, I seem to not have it.

$ ghc-pkg list | grep -i quickcheck
    Cabal-1.6.0.3, Chart-0.10.3, HUnit-1.2.0.3, QuickCheck-1.2.0.0,
    Diff-0.1.2, QuickCheck-2.1.0.1, binary-0.5.0.1,


When I am in ghci, I have the following options:

Prelude> :m +Test.QuickCheck
Test.QuickCheck            Test.QuickCheck.Function   
Test.QuickCheck.Monadic    Test.QuickCheck.Property   Test.QuickCheck.Test
Test.QuickCheck.Arbitrary  Test.QuickCheck.Gen        
Test.QuickCheck.Poly       Test.QuickCheck.State      Test.QuickCheck.Text
Prelude> :m +Test.QuickCheck

But no Test.QuickCheck.Batch

:(

Cheers,
Thomas


Lee Duhem wrote:
> 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