[Haskell-cafe] List of nitpicks

Roman Cheplyaka roma at ro-che.info
Fri Aug 21 08:26:57 UTC 2015


On 20/08/15 20:07, Dimitri DeFigueiredo wrote:
> Em 20/08/15 10:13, Johannes Waldmann escreveu:
>>> Should there be a similar place for tooling and libraries?
>> a Gargantuan task
>>
>>
>>> QuickCheck fails by letting all tests pass
>>> when you mistakenly provide polymorphic type signatures.
>> No!
>>
>>
>> Prelude Test.QuickCheck> quickCheck $ ( (\ x -> 1 > 9) :: a -> Bool)
>> *** Failed! Falsifiable (after 1 test):
>> ()
>>
>>
>> I think you mean "defaults everything to ()
>> and thus runs polymorphic tests at unexpected types"
> Exactly, but if you are testing with positive tests (which I find to be
> the common case and what you want in security testing), that usually
> means all the tests pass.
> 
>> Prelude Test.QuickCheck> quickCheck $ ( (\ xs -> xs == reverse xs ) ::
>> Eq a => [a] -> Bool)
>> +++ OK, passed 100 tests.

This can be solved, by the way:
https://ro-che.info/articles/2013-02-19-smallcheck#required-type-annotations

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150821/2c746867/attachment.sig>


More information about the Haskell-Cafe mailing list