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@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@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net


_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners