I just watched a video that presents the notion of integrated shrinking for property based tests. The approach seems to have some advantages over type directed shrinking, however it was pointed out in this reddit thread that the integrated shrinking approach does not fit well in the case of monadic generators:
Doing shrinking in your way does not fit well with a monadic style for generators. Here is an example, consider generating an arbitrary list (ignore termination for now):
do x <- arbitrary xs <- arbitrary return (x:xs)
Now, the default behavior of your shrinking would first shrink x (holding xs constant), and then shrink xs (holding x constant), which severely limits the shrinking (the concept of local minimum is now a lot less strong).
I read the above comment as "integrated shrinking might fail to provide a global minimum counter example". However, since hedgehog
seems to be able to find minimal counter examples for failed properties on lists, I was wondering if there is an example that could show the drawback pointed out in the quote above.