Hoogle Search
Within LTS Haskell 24.50 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
forAllShrink :: (Show a, Testable prop) => Gen a -> (a -> [a]) -> (a -> prop) -> PropertyQuickCheck Test.QuickCheck Like forAll, but tries to shrink the argument for failing test cases.
forAllShrinkBlind :: Testable prop => Gen a -> (a -> [a]) -> (a -> prop) -> PropertyQuickCheck Test.QuickCheck Like forAllShrink, but without printing the generated value.
forAllShrinkShow :: Testable prop => Gen a -> (a -> [a]) -> (a -> String) -> (a -> prop) -> PropertyQuickCheck Test.QuickCheck Like forAllShrink, but with an explicitly given show function.
-
QuickCheck Test.QuickCheck No documentation available.
-
QuickCheck Test.QuickCheck Optional; used internally in order to improve shrinking. Tests a property but also quantifies over an extra value (with a custom shrink and show function). The Testable instance for functions defines propertyForAllShrinkShow in a way that improves shrinking.
-
QuickCheck Test.QuickCheck Test all properties in the current module. The name of the property must begin with prop_. Polymorphic properties will be defaulted to Integer. Returns True if all tests succeeded, False otherwise. To use quickCheckAll, add a definition to your module along the lines of
return [] runTests = $quickCheckAll
and then execute runTests. Note: the bizarre return [] in the example above is needed on GHC 7.8 and later; without it, quickCheckAll will not be able to find any of the properties. For the curious, the return [] is a Template Haskell splice that makes GHC insert the empty list of declarations at that point in the program; GHC typechecks everything before the return [] before it starts on the rest of the module, which means that the later call to quickCheckAll can see everything that was defined before the return []. Yikes! -
QuickCheck Test.QuickCheck Test all properties in the current module. This is just a convenience function that combines quickCheckAll and verbose. verboseCheckAll has the same issue with scoping as quickCheckAll: see the note there about return [].
-
QuickCheck Test.QuickCheck.All Test all properties in the current module, using a custom quickCheck function. The same caveats as with quickCheckAll apply. $forAllProperties has type (Property -> IO Result) -> IO Bool. An example invocation is $forAllProperties quickCheckResult, which does the same thing as $quickCheckAll. forAllProperties has the same issue with scoping as quickCheckAll: see the note there about return [].
-
QuickCheck Test.QuickCheck.All Test all properties in the current module. The name of the property must begin with prop_. Polymorphic properties will be defaulted to Integer. Returns True if all tests succeeded, False otherwise. To use quickCheckAll, add a definition to your module along the lines of
return [] runTests = $quickCheckAll
and then execute runTests. Note: the bizarre return [] in the example above is needed on GHC 7.8 and later; without it, quickCheckAll will not be able to find any of the properties. For the curious, the return [] is a Template Haskell splice that makes GHC insert the empty list of declarations at that point in the program; GHC typechecks everything before the return [] before it starts on the rest of the module, which means that the later call to quickCheckAll can see everything that was defined before the return []. Yikes! -
QuickCheck Test.QuickCheck.All Test all properties in the current module. This is just a convenience function that combines quickCheckAll and verbose. verboseCheckAll has the same issue with scoping as quickCheckAll: see the note there about return [].