[QuickCheck] Detecting UserInterrupt / getting uncaught exceptions
Nick Smallbone
nick.smallbone at gmail.com
Tue Feb 5 17:40:34 GMT 2013
Hi Simon,
On 15 November 2012 13:43, Simon Hengel <sol at typeful.net> wrote:
>> But it's bad that you have to parse the failure reason to find out
>> what the exception was. I think I'll add an exception field to Result
>> to fix that. It won't tie QuickCheck to the new exceptions API: the
>> field will just have type Maybe SomeException on new GHCs and Maybe
>> Exception on old GHCs/Hugs.
I've just added an 'interrupted' flag to the Result type that tells
you for a Failure whether the user pressed ctrl-C. I've left off
returning the exception in the result type for now; really, the whole
way that QuickCheck returns results needs revamping (e.g., so that you
can get at the counterexample in a more structured way) so I will fix
all that in one go.
Nick
More information about the QuickCheck
mailing list