[Haskell-cafe] class Arbitrary in quickcheck

2010-05-05 Thread Tim Docker
I've notice a behaviour of quickcheck that is unexpected to me. With this code: import Test.QuickCheck main = check myconfig ((\v - v == v) :: (Maybe Double,Maybe Double) - Bool) myconfig = defaultConfig{configMaxTest=10, configEvery = \n args - show n ++ :\n

Re: [Haskell-cafe] class Arbitrary in quickcheck

2010-05-05 Thread Ozgur Akgun
your quick check property (in a different way of writing) is the following: prop_1 :: Maybe Double - Bool prop_1 v = v == v but what you want is actually the following: prop_2 :: Maybe Double - Maybe Double - Bool prop_2 v1 v2 = v2 == v2 if I understood the problem correctly, using prop_2

Re: [Haskell-cafe] class Arbitrary in quickcheck

2010-05-05 Thread Ozgur Akgun
There is a typo, in my previous post, It should have been: prop_2 v1 v2 = v1 == v2 not: prop_2 v1 v2 = v2 == v2 Moreover, I realised that the (nice) function verboseCheck doesn't exist in QuickCheck 2. However you can always do the following in ghci, to see whether my suggestion works or not:

Re: [Haskell-cafe] class Arbitrary in quickcheck

2010-05-05 Thread Tim Docker
On 5 May 2010 09:01, Ozgur Akgun ozgurak...@gmail.com wrote: your quick check property (in a different way of writing) is the following: prop_1 :: Maybe Double - Bool prop_1 v = v == v I think you misunderstood me. The property was fabricated just for

Re: [Haskell-cafe] class Arbitrary in quickcheck

2010-05-05 Thread Ozgur Akgun
On 5 May 2010 11:38, Tim Docker t...@dockerz.net wrote: On 5 May 2010 09:01, Ozgur Akgun ozgurak...@gmail.com wrote: your quick check property (in a different way of writing) is the following: prop_1 :: Maybe Double - Bool prop_1 v = v == v I think you