Find the value that failed for quickcheck
问题 When a value fails a QuickCheck'd test, I'd like to use it for debugging. Is there any way I can do something like: let failValue = quickCheck' myTest in someStuff failValue If my data was read able then I could probably hack some way to get it in from IO, but it's not. 回答1: I couldn't find anything in the QuickCheck API to do this in a nice way, but here's something I hacked together using the monadic QuickCheck API. It intercepts and logs the inputs to your property in an IORef , and