
I'm trying to follow the instructions in http://haskell.org/haskellwiki/How_to_write_a_Haskell_program. I'm at the step where we've just written a QuickCheck test: amy@localhost ~/forbairt/haq $ cat Tests.hs import Char import List import Test.QuickCheck import Text.Printf main = mapM_ (\(s,a) -> printf "%-25s: " s >> a) tests instance Arbitrary Char where arbitrary = choose ('\0', '\128') coarbitrary c = variant (ord c `rem` 4) -- reversing twice a finite list, is the same as identity prop_reversereverse s = (reverse . reverse) s == id s where _ = s :: [Int] -- and add this to the tests list tests = [("reverse.reverse/id", test prop_reversereverse)] But when I try to run it, I get the following errors: amy@localhost ~/forbairt/haq $ runhaskell Tests.hs Tests.hs:10:4: `coarbitrary' is not a (visible) method of class `Arbitrary' Tests.hs:17:33: Not in scope: `test' I think this has something to do with the changes between QuickCheck v1 and v2. Can someone tell me what I need to do to make this example work? Thank you in advance! Amy