[QuickCheck] Shrinking a list

Jurriën Stutterheim j.stutterheim at me.com
Thu Dec 20 13:21:43 GMT 2012


Dear QC devs,


I am trying to understand `shrink`'s behaviour. Let's start with a small example:

Prelude Test.QuickCheck> shrink [0,1,2]
[[],[1,2],[0,2],[0,1],[0,0,2],[0,1,0],[0,1,1]]

In this example, where I apply `shrink` to the list `[0,1,2]`, `shrink` does not produce any singleton lists. Why is that? After all, a minimal counter-example could be found in, e.g., the list `[1]`.

Thanks in advance!


Jurriën


More information about the QuickCheck mailing list