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.

  1. forAllShrink :: (Show a, Testable prop) => Gen a -> (a -> [a]) -> (a -> prop) -> Property

    QuickCheck Test.QuickCheck

    Like forAll, but tries to shrink the argument for failing test cases.

  2. forAllShrinkBlind :: Testable prop => Gen a -> (a -> [a]) -> (a -> prop) -> Property

    QuickCheck Test.QuickCheck

    Like forAllShrink, but without printing the generated value.

  3. forAllShrinkShow :: Testable prop => Gen a -> (a -> [a]) -> (a -> String) -> (a -> prop) -> Property

    QuickCheck Test.QuickCheck

    Like forAllShrink, but with an explicitly given show function.

  4. getSmall :: Small a -> a

    QuickCheck Test.QuickCheck

    No documentation available.

  5. propertyForAllShrinkShow :: Testable prop => Gen a -> (a -> [a]) -> (a -> [String]) -> (a -> prop) -> Property

    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.

  6. quickCheckAll :: Q Exp

    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!

  7. verboseCheckAll :: Q Exp

    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 [].

  8. forAllProperties :: Q Exp

    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 [].

  9. quickCheckAll :: Q Exp

    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!

  10. verboseCheckAll :: Q Exp

    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 [].

Page 197 of many | Previous | Next