[Haskell] ANN: SmallCheck 0.1

Colin Runciman colin at cs.york.ac.uk
Thu Sep 14 04:28:09 EDT 2006


>Let's run QuickCheck (check) head to head with SmallCheck (scheck): 
>    lambdabot> scheck \s -> not (null s) ==> minimum (s :: [Int]) == (last . sort) s
>      Failed test no. 10. Test values follow.: [-1,-1,-1,-1,-1,-1,-1,0]
>    lambdabot> check \s -> not (null s) ==> minimum (s :: [Int]) == (last . sort) s
>     Falsifiable, after 1 tests: [2,1]
So your plugin  is based on depthCheck 8, not the iterative deepening
of smallCheck; otherwise smallCheck would report [-1,0] as the first

I'll add a 'batch' version of iterative deepening.

>One thing needed for online use: some more instances for the various numeric
>types might be useful, Float, Double, Ratio, Complex etc.
Fair point.  I admit that I rarely use numbers other than the non-negative
integers when programming. Even deciding to include -1 in the default Int
series was a trip into an alien world. :-)  

I'll add some simple default instances for other numeric types used by
the more arithmetically adventurous.


More information about the Haskell mailing list