nick8325 / quickcheck

Automatic testing of Haskell programs.
Other
717 stars 119 forks source link

Strictness for crashes interacts in funny ways with shrinking #400

Open MaximilianAlgehed opened 5 months ago

MaximilianAlgehed commented 5 months ago

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.