úÎA=Ï2      !"#$%&'()*+,-./01"Roman Cheplyaka <roma@ro-che.info>" is a wrapper for 2, types that causes only non-negative values . to be generated. Generated functions of type N a -> b do not distinguish  different negative values of a.  See also  and . 3456789: is a function from the depth to a finite list of values. 'Maximum depth of generated test values EFor data values, it is the depth of nested constructor applications. DFor functional values, it is both the depth of nested case analysis  and the depth of results. Sum (union) of series Product of series :;< 2For customising the depth measure. Use with care! =>    "Roman Cheplyaka <roma@ro-che.info>Anything of a  type can be regarded as a "test" Wrapper type for s ? means that the precondition of .  was not satisfied  !Wrap a  into a  ",A lower-level way to create properties. Use ! if possible. MThe argument is a function that produces the list of results given the depth  of testing. #$@A%Return B iff the result is  C&'()** p. holds iff it is possible to find an argument a (within the . depth constraints!) satisfying the predicate p +Like *1, but additionally require the uniqueness of the # argument satisfying the predicate ,JThe default testing of existentials is bounded by the same depth as their M context. This rule has important consequences. Just as a universal property N may be satisfied when the depth bound is shallow but fail when it is deeper, I so the reverse may be true for an existential property. So when testing O properties involving existentials it may be appropriate to try deeper testing J after a shallow failure. However, sometimes the default same-depth-bound O interpretation of existential properties can make testing of a valid property C fail at all depths. Here is a contrived but illustrative example:  -prop_append1 :: [Bool] -> [Bool] -> Property 2prop_append1 xs ys = exists $ \zs -> zs == xs++ys ,' transforms the depth bound by a given  ->  function: -prop_append2 :: [Bool] -> [Bool] -> Property ?prop_append2 xs ys = existsDeeperBy (*2) $ \zs -> zs == xs++ys -Like ,1, but additionally require the uniqueness of the # argument satisfying the predicate .The .# operator can be used to express a H restricting condition under which a property should hold. For example, 3 testing a propositional-logic module (see examples/logical), we might  define:  8prop_tautEval :: Proposition -> Environment -> Property prop_tautEval p e =  tautology p ==> eval p e 'But here is an alternative definition:  )prop_tautEval :: Proposition -> Property prop_taut p = ! tautology p ==> \e -> eval p e BThe first definition generates p and e for each test, whereas the 3 second only generates e if the tautology p holds. 9The second definition is far better as the test-space is  reduced from PE to T'+TE where P, T, T' and E are the numbers of > propositions, tautologies, non-tautologies and environments.  !"#$%&'()*+,-. %!".*,+-#$&(')  !"#$%&'()*+,-."Roman Cheplyaka <roma@ro-che.info>/IRun series of tests using depth bounds 0..d, stopping if any test fails, 2 and print a summary report or a counter-example. 0Same as /&, but test for values of depth d only 1<Interactive variant, asking the user whether testing should  continue/go deeper after a failure/completed iteration. Example session: "haskell> smallCheckI prop_append1  Depth 0: ' Completed 1 test(s) without failure.  Deeper? y  Depth 1: ) Failed test no. 5. Test values follow.  [True]  [True]  Continue? n  Deeper? n  haskell> DEFG/01/10/01"Roman Cheplyaka <roma@ro-che.info> !*+,-./01 !*+,-./01H      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNsmallcheck-0.6Test.SmallCheck.SeriesTest.SmallCheck.PropertyTest.SmallCheck.DriversTest.SmallCheckNaturalNatNSerialseriescoseriesSeriesDepth\/><cons0cons1cons2cons3cons4alts0alts1alts2alts3alts4depthTestabletestPropertyTestCaseresult arguments TestResult InappropriateFailPassproperty mkPropertyforAll forAllElem resultIsOk thereExists thereExists1thereExistsElemthereExists1Elemexistsexists1existsDeeperByexists1DeeperBy==> smallCheck depthCheck smallCheckIbaseGHC.RealIntegralDSeries GSerialSum gSeriesSum gCoseriesSumGSerialgSeries gCoseriesfracuncurry3uncurry4decinc existenceuniqueghc-prim GHC.TypesFalse boolToResult iterCheckcheckwhenUserWishesprogressReport