quickcheck icon indicating copy to clipboard operation
quickcheck copied to clipboard

Strictness for crashes interacts in funny ways with shrinking

Open MaximilianAlgehed opened this issue 9 months ago • 0 comments

Consider the following:

$> quickCheck $ forAllShrink (pure undefined) (\ () -> []) $ \ () -> True
*** Failed! (after 1 test):                            
Exception while generating shrink-list:
  Prelude.undefined
  CallStack (from HasCallStack):
    undefined, called at <interactive>:8:33 in interactive:Ghci7
Exception thrown while showing test case:
  Prelude.undefined
  CallStack (from HasCallStack):
    undefined, called at <interactive>:8:33 in interactive:Ghci7

The fact that the first thing the user sees when they've screwed up in the generator is that the shrinker failed is not optimal.

MaximilianAlgehed avatar May 03 '24 13:05 MaximilianAlgehed