!n,c      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Safe7;=   smallcheck#An explanation for the test outcome  5 TrustworthyKj smallcheck is a D action that enumerates values of a certain type, up to some depth."The depth bound is tracked in the SC# monad and can be extracted using getDepth and changed using  localDepth.9To manipulate series at the lowest level you can use its ,  and _ instances. This module provides some higher-level combinators which simplify creating series. A proper 7 should be monotonic with respect to the depth  i.e. localDepth (+1) s! should emit all the values that s! emits (and possibly some more).[It is also desirable that values of smaller depth come before the values of greater depth. smallcheck'Maximum depth of generated test values.DFor data values, it is the depth of nested constructor applications.^For functional values, it is both the depth of nested case analysis and the depth of results.(c) Colin Runciman et al.BSD3"Roman Cheplyaka <roma@ro-che.info> Trustworthy7;<=>?KQSTV8 smallcheck NonEmpty xs: guarantees that xs is not null smallcheck NonNegative x: guarantees that x >= 0. smallcheck Positive x: guarantees that x > 0. smallcheckN is a helper type to generate values of a signed type of increasing magnitude. smallcheck is a wrapper for Z types that causes only non-negative values to be generated. Generated functions of type N a -> b2 do not distinguish different negative values of a. smallcheck A proper  implementation should pass the depth unchanged to its first argument. Doing otherwise will make enumeration of curried functions non-uniform in their arguments. smallcheck[A simple series specified by a function from depth to the list of values up to that depth.  smallcheckLimit a  to its first n elements! smallcheckHGiven a depth, return the list of values generated by a Serial instance.)Example, list all integers up to depth 1: +listSeries 1 :: [Int] -- returns [0,1,-1]" smallcheck)Return the list of values generated by a . Useful for debugging  instances. Examples: list 3 8 :: [Int] -- returns [0,1,-1,2,-2,3,-3] list 3 ( ::  $ Int) -- returns [0,1,-1,2,-2,3,-3] list 2 9 :: [[Bool]] -- returns [[],[True],[False]]JThe first two are equivalent. The second has a more explicit type binding.# smallcheckMonadic version of "$ smallcheckSum (union) of series% smallcheckProduct of series& smallcheckFair version of  and ' smallcheckQuery the current depth( smallcheck"Run a series with a modified depth) smallcheckRun a  with the depth decreased by 1.:If the current depth is less or equal to 0, the result is .* smallcheck * =  + smallchecksFix the depth of a series at the current level. The resulting series will no longer depend on the "ambient" depth., smallcheckxIf the current depth is 0, evaluate the first argument. Otherwise, evaluate the second argument with decremented depth./ smallcheckSame as ., but preserves the depth.8 smallcheckSame as 4, but preserves the depth., !"#$%&'()*+,-./012345678,-.012/345678$%&()' !"#+,*$7%8&4(c) Colin Runciman et al.BSD3"Roman Cheplyaka <roma@ro-che.info>Safe 1;=>?FTVYU  smallcheckqClass of tests that can be run in a monad. For pure tests, it is recommended to keep their types polymorphic in m! rather than specialising it to Identity. smallcheck&The type of properties over the monad m smallcheck s $ \x -> p x makes x range over the  s, (by default, all variables range over the  for their types).Note that, unlike the quantification operators, this affects only the variable following the operator and not subsequent variables., does not affect the quantification context. smallcheckExecute a monadic test smallcheck(Set the universal quantification context smallcheck*Set the existential quantification context smallcheck*Set the uniqueness quantification context.HBear in mind that "! (x, y): p x y is not the same as "! x: "! y: p x y.For example, "! x: "! y: |x| = |y| is true (it holds only when x=0), but "! (x,y): |x| = |y| is false (there are many such pairs).!As is customary in mathematics,  $ \x y -> p x y is equivalent to  $ \(x,y) -> p x y and not to  $ \x ->  $ \y -> p x yB (the latter, of course, may be explicitly written when desired).mThat is, all the variables affected by the same uniqueness context are quantified simultaneously as a tuple. smallcheckThe  operator can be used to express a restricting condition under which a property should hold. It corresponds to implication in the classical logic. Note that P resets the quantification context for its operands to the default (universal). smallcheckVRun property with a modified depth. Affects all quantified variables in the property. smallcheck*Quantify the function's argument over its F, but adjust the depth. This doesn't affect any subsequent variables. smallcheckWorks like the 5 instance, but includes an explanation of the result. and 6 correspond to test failure and success respectively. 0(c) Colin Runciman et al.BSD3"Roman Cheplyaka <roma@ro-che.info>Safe<ai smallcheck*A simple driver that runs the test in the  monad and prints the results. smallcheck Use this if:1You need to run a test in a monad different from ;You need to analyse the results rather than just print them smallcheckLike R, but allows to specify a monadic hook that gets executed after each test is run.NUseful for applications that want to report progress information to the user.   (c) Colin Runciman et al.BSD3"Roman Cheplyaka <roma@ro-che.info>Safec>        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'smallcheck-1.1.5-3f5qiJxrEExLmWHgkqVfWSTest.SmallCheck.SeriesTest.SmallCheck.DriversTest.SmallCheckTest.SmallCheck.Property.ResultTest.SmallCheck.SeriesMonadTest.SmallCheck.Property$logict-0.6.0.2-bTigcTuAfUFUMwCRYsf8LControl.Monad.Logic.Class>>-PropertyFailureNotExist AtLeastTwoCounterExample PropertyFalsePropertySuccessExist ExistUnique PropertyTrue VacuouslyReasonArgument ppFailureSeriesDepthNonEmpty getNonEmpty NonNegativegetNonNegativePositive getPositiveCoSerialcoseriesSerialseries genericSeriesgenericCoseriesgeneratelimit listSerieslistlistM\/><<~>getDepth localDepthdecDepthconstMfixDepthdecDepthCheckedcons0cons1 newtypeConscons2cons3cons4alts0alts1alts2alts3alts4 newtypeAlts $fGSerialmM1 $fGSerialm:+: $fGSerialm:*: $fGSerialmU1 $fGSerialmM10 $fShow(->) $fSerialm[]$fSerialmEither$fSerialmMaybe $fSerialmBool$fSerialm(,,,) $fSerialm(,,) $fSerialm(,) $fSerialmChar$fSerialmDouble$fSerialmFloat $fSerialm() $fGSerialmK1$fGCoSerialm:+:$fGCoSerialm:*:$fGCoSerialmU1$fGCoSerialmM1$fCoSerialm(->) $fSerialm(->) $fCoSerialm[]$fCoSerialmEither$fCoSerialmMaybe$fCoSerialmBool$fCoSerialm(,,,)$fCoSerialm(,,)$fCoSerialm(,)$fCoSerialmRatio$fCoSerialmDouble$fCoSerialmFloat $fCoSerialm()$fGCoSerialmK1$fCoSerialmChar $fCoSerialmN $fSerialmN$fCoSerialmWord64$fSerialmWord64$fCoSerialmWord32$fSerialmWord32$fCoSerialmWord16$fSerialmWord16$fCoSerialmWord8$fSerialmWord8$fCoSerialmWord $fSerialmWord$fCoSerialmNatural$fSerialmNatural $fCoSerialmM $fSerialmM$fCoSerialmInt64$fSerialmInt64$fCoSerialmInt32$fSerialmInt32$fCoSerialmInt16$fSerialmInt16$fCoSerialmInt8 $fSerialmInt8$fCoSerialmInt $fSerialmInt$fCoSerialmInteger$fSerialmInteger$fShowPositive$fSerialmPositive$fSerialmRatio$fShowNonNegative$fSerialmNonNegative$fShowNonEmpty$fSerialmNonEmpty$fEqN$fOrdN$fRealN$fEnumN$fNumN $fIntegralN$fEqM$fOrdM$fRealM$fEnumM$fNumM $fIntegralM $fEqPositive $fOrdPositive $fNumPositive$fIntegralPositive$fRealPositive$fEnumPositive$fEqNonNegative$fOrdNonNegative$fNumNonNegative$fIntegralNonNegative$fRealNonNegative$fEnumNonNegativeTestabletest TestQualityGoodTestBadTestPropertyovermonadicforAllexists existsUnique==> changeDepth changeDepth1 smallCheck smallCheckMsmallCheckWithHook MonadLogicbaseGHC.BaseMonad MonadPlus runSeriesMNGHC.RealIntegralData.Functor.IdentityIdentityap<*>mzeroliftMconst$fTestablemEitherghc-prim GHC.TypesBool Data.EitherLeftRight runPropertyIO