[QuickCheck] Bug with Small and Positive types

Bryan O'Sullivan bos at serpentine.com
Sun May 4 04:24:54 BST 2014


Not exactly expected behaviour: I get values that are not positive.

>>> sample (arbitrary :: Gen (Small (Positive Int)))
Small {getSmall = Positive {getPositive = 0}}
Small {getSmall = Positive {getPositive = -1}}
Small {getSmall = Positive {getPositive = 2}}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://projects.haskell.org/pipermail/quickcheck/attachments/20140503/66bcb088/attachment.htm>


More information about the QuickCheck mailing list