Thanks Kim-Ee!

This makes more sense now. It does still seem like very unsafe default behavior by quickCheck. In other words, quickcheck shouldn't be designed to let code pass all tests if its user (me) forgets to make a property monomorphic. In any case, the following two links suggested by your google search were very useful:

http://www.haskell.org/pipermail/haskell/2009-October/021657.html
and the related paper
http://www.cse.chalmers.se/~bernardy/PolyTest.pdf

Thanks again,

Dimitri

On 16/10/14 22:34, Kim-Ee Yeoh wrote:

On Fri, Oct 17, 2014 at 10:55 AM, Dimitri DeFigueiredo <defigueiredo@ucdavis.edu> wrote:
Finally and most puzzling, why does quickCheck give out the wrong result if I don't specify the type when testing 'const_bug'?

Quickcheck properties must be monomorphic. Otherwise defaulting rules set you up for () and hilarity ensues.

Did you google "quickcheck polymorphic types"?

-- Kim-Ee


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