[Haskell-beginners] QuickCheck Crazy

Dimitri DeFigueiredo defigueiredo at ucdavis.edu
Fri Oct 17 18:55:20 UTC 2014


I agree we have to pick a poison here and I didn't know that the 
Extended Default Rules were the culprit, but I think the end result is 
scary because forgetting a type signature is about the most common 
mistake I make. Having that imply that tests will silently pass means 
(to me) that it's not safe to use Quickcheck with GHCi. Or, just 
remember to always make properties monomorphic. "Always!"

I would be much more comfortable using quickCheck' the version where () 
implies user error, as you suggested. For me that is an enhacement to 
quickCheck that allows it to be used in GHCi, but that is just my opinion.

In any case, thanks for shedding more light on the reasons behind the 
design.

Dimitri


On 17/10/14 07:59, Brandon Allbery wrote:
> On Fri, Oct 17, 2014 at 1:53 AM, Dimitri DeFigueiredo 
> <defigueiredo at ucdavis.edu <mailto:defigueiredo at ucdavis.edu>> wrote:
>
>     This makes more sense now. It does still seem like very unsafe
>     default behavior by quickCheck.
>
>
> QuickCheck has no way of knowing that ghci has ExtendedDefaultRules 
> enabled, and (quite aside from the difficulty of doing type-case in 
> Haskell) I'm not sure that arbitrarily declaring types involving () to 
> be user error is a good idea.
>
> -- 
> brandon s allbery kf8nh sine nomine associates
> allbery.b at gmail.com <mailto:allbery.b at gmail.com> 
> ballbery at sinenomine.net <mailto:ballbery at sinenomine.net>
> unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
>
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20141017/c56ab668/attachment.html>


More information about the Beginners mailing list