
Hello All,
I am asking help with using QuickCheck. I tried everything I could think
of, but invariably as soon as I start invoking the quickCheck function
on my property it fails with
*Data.FingerSearchTreeUtil>
Top level:
No instance for (Show (IO ()))
arising from use of `print' at Top level
Probable fix: add an instance declaration for (Show (IO ()))
In a 'do' expression: print it
<interactive>:1:0:
No instances for (Arbitrary (OrdSeq Int), Show (OrdSeq Int))
arising from use of `quickCheck' at <interactive>:1:0-20
Probable fix:
add an instance declaration for (Arbitrary (OrdSeq Int), Show
(OrdSeq Int))
In the definition of `it': it = quickCheck prop_DeleteInsert
The property is quite a simple one:
prop_DeleteInsert x xs = delete x (insert x xs) == xs
where types = xs :: OrdSeq Int
My code compiles just fine with ghc. I tried some examples from the
QuickCheck manual and these seem to work; at least I get the expected
"OK, passed 100 tests.".
What am I doing wrong?
Besides, there are some really non-obvious quirks with QuickCheck. For
instance, the following one caused me some headache:
I downloaded the haskell script 'quickCheck' and modified the line where
ghci is executed like this:
system ("/usr/bin/ghci -cpp -package QuickCheck "++options opts'++"