purescript-jack
purescript-jack copied to clipboard
Properties: Discarding, Aborting
There are a couple of things that I miss from QuickCheck, but can't figure out how to add without some core changes to Property:
==>: There's no way toDiscarda test case; it's eitherSuccessorFailurevs [Haskell] QuickCheck's tri-state result.once: There's no equivalent ofabort :: Bool; the only cap on the number of times a test is run is all the way back up incheck', meaning any change (eg. allowing configuration of the default runner's hardcoded "100attempts") would be global.
Any thoughts how this should be tackled? My first thought is having Property be more than a newtype, but you might already have an idea as to how you'd tackle this.
(I note that Haskell-Jack piggybacks on the QuickCheck definitions, so following suit with the definition of Property might've been your intent all along.)
I have actually implemented all this in dotnet-jack, so the plan is to port it back in to here.
https://github.com/jystic/dotnet-jack/blob/master/Jack/Property.fs
Ha! Oops. Do you want to do it or shall I?
Edit: Umm. This may be a little too extensive for me to tackle, in light of the Property-is-now-a-Monad plan.
Yeah I would rather do it, I'll have a go at it on the weekend if you can wait that long?
Thanks. 💦 And please take your time; I didn't mean to give the impression that this was something to rush out.