[Haskell-cafe] Re: class Arbitrary in quickcheck

Malcolm Wallace malcolm.wallace at cs.york.ac.uk
Thu May 6 04:50:48 EDT 2010


> So the good news is that quickcheck 2.1 behaves as I expected. I'm
> still curious as to the behaviour of the older version.


In QC 1.2, the instance of Arbitrary for the Maybe type uses the  
"sized" combinator to choose between Nothing and Just, whereas in QC  
2.1, the instance uses the "frequency" combinator.  I'm guessing that  
the notion of size applies to the whole enclosing value, so gets  
replicated to all of its parts, whereas frequency is independently  
generated for each component.

Regards,
     Malcolm



More information about the Haskell-Cafe mailing list