Closed danr closed 6 years ago
How weird! It looks like the extra parameter was introduced in ebc7cf2d but even then was never used.
Yes, no backtracking, it just picks the first failing element in the shrink list, in other words it finds a local minimum. This is because if you do backtracking there will be exponentially many shrink candidates. It can help to put more aggressive shrinks first as that can reduce the number of shrink steps needed.
The third argument to
localMin
is never used: https://github.com/nick8325/quickcheck/blob/44379d9e7d406a8a6ca35d45b23cfc81b6a502b0/Test/QuickCheck/Test.hs#L441-L446The only place I find where it is called with different arguments is from
localMin'
: https://github.com/nick8325/quickcheck/blob/44379d9e7d406a8a6ca35d45b23cfc81b6a502b0/Test/QuickCheck/Test.hs#L467-L468While I'm on the subject of the shrink loop: it seems like this loop never backtracks, is this correct? Is the intent with shrink-lists that the "best" shrinks are first in the list?