I\'m trying to use QuickCheck following another answer. I test like this:
{-# LANGUAGE TemplateHaskell #-}
import Test.QuickCheck
import Test.QuickCheck.All
From the Test.QuickCheck.All docs:
To use
quickCheckAll, add a definition to your module along the lines ofreturn [] runTests = $quickCheckAlland then execute
runTests.Note: the bizarre
return []in the example above is needed on GHC 7.8; without it,quickCheckAllwill not be able to find any of the properties.
Adding return [] before your check makes it work for me.
To use quickCheckAll, you need a function which reads:
return []
runTests = $quickCheckAll
The other comment mentions this, but doesn't point out that it will still always return true unless the function is located below all of your quickCheck functions!