h*Kܭ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~        2.15.0.1 Safe QuickCheckTest if an exception was a ^C;. QuickCheck won't try to shrink an interrupted test case. QuickCheck/A special error value. If a property evaluates , it causes QuickCheck to discard the current test case. This can be useful if you want to discard the current test case, but are somewhere you can't use  , such as inside a generator.  TrustworthyR QuickCheckThe "standard" QuickCheck random number generator. A wrapper around either  on GHC, or  on other Haskell systems. Safe QuickCheckA generator for values of type a.The third-party packages  2http://hackage.haskell.org/package/QuickCheck-GenTQuickCheck-GenT and  9http://hackage.haskell.org/package/quickcheck-transformerquickcheck-transformer( provide monad transformer versions of Gen. QuickCheckRun the generator on a particular seed and size. If you just want to get a random value out, consider using . QuickCheck+Modifies a generator using an integer seed. QuickCheck?Used to construct generators that depend on the size parameter. For example,  , which uses the size parameter as an upper bound on length of lists it generates, can be defined like this: listOf :: Gen a -> Gen [a] listOf gen = sized $ \n -> do k <- choose (0,n) vectorOf k genYou can also do this using . QuickCheckReturns the size parameter. Used to construct generators that depend on the size parameter. For example,  , which uses the size parameter as an upper bound on length of lists it generates, can be defined like this: listOf :: Gen a -> Gen [a] listOf gen = do n <- getSize k <- choose (0,n) vectorOf k genYou can also do this using . QuickCheckOverrides the size parameter. Returns a generator which uses the given size instead of the runtime-size parameter. QuickCheckAdjust the size parameter, by transforming it with the given function.  QuickCheckGenerates a random element in the given inclusive range. For integral and enumerated types, the specialised variants of   below run much quicker.  QuickCheck5Generates a random element over the natural range of a.  QuickCheckA fast implementation of   for enumerated types.  QuickCheckA fast implementation of   for .  QuickCheckA fast implementation of   for bounded integral types. QuickCheckA fast implementation of   for . QuickCheckRun a generator. The size passed to the generator is always 30; if you want another size then you should explicitly use . QuickCheckGenerates some example values. QuickCheck1Generates some example values and prints them to stdout. QuickCheck Generate  in 0..1 range QuickCheck Generate  in 0..1 range QuickCheck-Generates a value that satisfies a predicate. QuickCheck9Generates a value for which the given function returns a !, and then applies the function. QuickCheckTries to generate a value that satisfies a predicate. If it fails to do so after enough attempts, returns Nothing. QuickCheckRandomly uses one of the given generators. The input list must be non-empty. QuickCheckChooses one of the given generators, with a weighted random distribution. The input list must be non-empty. QuickCheckGenerates one of the given values. The input list must be non-empty. QuickCheck1Generates a random subsequence of the given list. QuickCheck1Generates a random permutation of the given list. QuickCheckTakes a list of elements of increasing size, and chooses among an initial segment of the list. The size of this initial segment increases with the size parameter. The input list must be non-empty.  QuickCheckGenerates a list of random length. The maximum length depends on the size parameter.! QuickCheckGenerates a non-empty list of random length. The maximum length depends on the size parameter." QuickCheck%Generates a list of the given length.# QuickCheckGenerates an infinite list.#  !"##  !"#Safe!* QuickCheck>Promotes a monadic generator to a generator of monadic values.+ QuickCheck&Randomly generates a function of type  a -> a, which you can then use to evaluate generators. Mostly useful in implementing *., QuickCheck A variant of + that returns a polymorphic evaluation function. Can be used in a pinch to generate polymorphic (rank-2) values: genSelector :: Gen (a -> a -> a) genSelector = elements [\x y -> x, \x y -> y] data Selector = Selector (forall a. a -> a -> a) genPolySelector :: Gen Selector genPolySelector = do Capture eval <- capture return (Selector (eval genSelector))()*+,*+,() Trustworthy0=H1- QuickCheckUsed for random generation of functions. You should consider using = instead, which can show the generated functions as strings.If you are using a recent GHC, there is a default definition of . using V, so if your type has a  instance it's enough to say instance CoArbitrary MyTypeYou should only use V for data types where equality is structural, i.e. if you can't have two different representations of the same value. An example where it's not safe is sets implemented using binary search trees: the same set can be represented as several different trees. Here you would have to explicitly define &coarbitrary s = coarbitrary (toList s).. QuickCheck$Used to generate a function of type a -> b. The first argument is a value, the second a generator. You should use  to perturb the random generator; the goal is that different values for the first argument will lead to different calls to . An example will help: instance CoArbitrary a => CoArbitrary [a] where coarbitrary [] =  0 coarbitrary (x:xs) =  1 . coarbitrary (x,xs)  QuickCheckProvides the immediate subterms of a term that are of the same type as the term itself.In contrast to 9, this returns the immediate next constructor available. QuickCheckProvides the immediate subterms of a term that are of the same type as the term itself.Requires a constructor to be stripped off; this means it skips through M1 wrappers and returns [] on everything that's not  or .Once a  or ; constructor has been reached, this function delegates to 7 to return the immediately next constructor available.1 QuickCheckLifting of the 7# class to binary type constructors.4 QuickCheckLifting of the 7" class to unary type constructors.7 QuickCheck*Random generation and shrinking of values.QuickCheck provides  Arbitrary instances for most types in base, except those which incur extra dependencies. For a wider range of  Arbitrary instances see the  7http://hackage.haskell.org/package/quickcheck-instancesquickcheck-instances package.8 QuickCheck)A generator for values of the given type.It is worth spending time thinking about what sort of test data you want - good generators are often the difference between finding bugs and not finding them. You can use , label and classify( to check the quality of your test data.There is no generic  arbitrary implementation included because we don't know how to make a high-quality one. If you want one, consider using the  /http://hackage.haskell.org/package/testing-feat testing-feat or  1http://hackage.haskell.org/package/generic-randomgeneric-random packages.The  7http://www.cse.chalmers.se/~rjmh/QuickCheck/manual.htmlQuickCheck manual goes into detail on how to write good generators. Make sure to look at it, especially if your type is recursive!9 QuickCheckProduces a (possibly) empty list of all the possible immediate shrinks of the given value.The default implementation returns the empty list, so will not try to shrink the value. If your data type has no special invariants, you can enable shrinking by defining  shrink = >', but by customising the behaviour of shrink+ you can often get simpler counterexamples.Most implementations of 9" should try at least three things: Shrink a term to any of its immediate subterms. You can use @ to do this.Recursively apply 9, to all immediate subterms. You can use ? to do this.Type-specific shrinkings such as replacing a constructor by a simpler constructor.For example, suppose we have the following implementation of binary trees: .data Tree a = Nil | Branch a (Tree a) (Tree a)We can then define 9 as follows: shrink Nil = [] shrink (Branch x l r) = -- shrink Branch to Nil [Nil] ++ -- shrink to subterms [l, r] ++ -- recursively shrink subterms [Branch x' l' r' | (x', l', r') <- shrink (x, l, r)]&There are a couple of subtleties here:QuickCheck tries the shrinking candidates in the order they appear in the list, so we put more aggressive shrinking steps (such as replacing the whole tree by Nil) before smaller ones (such as recursively shrinking the subtrees).,It is tempting to write the last line as [Branch x' l' r' | x' <- shrink x, l' <- shrink l, r' <- shrink r] but this is the  wrong thing(! It will force QuickCheck to shrink x, l and r) in tandem, and shrinking will stop once one! of the three is fully shrunk.There is a fair bit of boilerplate in the code above. We can avoid it with the help of some generic functions. The function > tries shrinking a term to all of its subterms and, failing that, recursively shrinks the subterms. Using it, we can define 9 as: shrink x = shrinkToNil x ++ genericShrink x where shrinkToNil Nil = [] shrinkToNil (Branch _ l r) = [Nil]> is a combination of @4, which shrinks a term to any of its subterms, and ?, which shrinks all subterms of a term. These may be useful if you need a bit more control over shrinking than > gives you.!A final gotcha: we cannot define 9 as simply 9 x = Nil:> x as this shrinks Nil to Nil/, and shrinking will go into an infinite loop.1If all this leaves you bewildered, you might try 9 = > to begin with, after deriving Generic for your type. However, if your data type has any special invariants, you will need to check that > can't break those invariants.> QuickCheckShrink a term to any of its immediate subterms, and also recursively shrink all subterms.? QuickCheck*Recursively shrink all immediate subterms.@ QuickCheck!All immediate subterms of a term.A QuickCheckShrink a list of values given a shrinking function for individual values.B QuickCheck,Apply a binary function to random arguments.C QuickCheck-Apply a ternary function to random arguments.D QuickCheck0Apply a function of arity 4 to random arguments.E QuickCheckGenerates an integral number. The number can be positive or negative and its maximum absolute value depends on the size parameter.F QuickCheckGenerates a natural number. The number's maximum value depends on the size parameter.G QuickCheckUniformly generates a fractional number. The number can be positive or negative and its maximum absolute value depends on the size parameter.H QuickCheckGenerates an integral number. The number is chosen uniformly from the entire range of the type. You may want to use K instead.I QuickCheckGenerates an element of a bounded type. The element is chosen from the entire range of the type.J QuickCheck.Generates an element of a bounded enumeration.K QuickCheckGenerates an integral number from a bounded domain. The number is chosen from the entire range of the type, but small numbers are generated more often than big numbers. Inspired by demands from Phil Wadler.L QuickCheck5Generates any Unicode character (but not a surrogate)M QuickCheck+Generates a random ASCII character (0-127).N QuickCheck(Generates a printable Unicode character.O QuickCheck"Returns no shrinking alternatives.P QuickCheckMap a shrink function to another domain. This is handy if your data type has special invariants, but is almost isomorphic to some other type. shrinkOrderedList :: (Ord a, Arbitrary a) => [a] -> [[a]] shrinkOrderedList = shrinkMap sort id shrinkSet :: (Ord a, Arbitrary a) => Set a -> [Set a] shrinkSet = shrinkMap fromList toList Q QuickCheckNon-overloaded version of P.R QuickCheckShrink an integral number.S QuickCheck+Shrink an element of a bounded enumeration.Example data MyEnum = E0 | E1 | E2 | E3 | E4 | E5 | E6 | E7 | E8 | E9 deriving (Bounded, Enum, Eq, Ord, Show) shrinkBoundedEnum E9 [E0,E5,E7,E8]shrinkBoundedEnum E5 [E0,E3,E4]shrinkBoundedEnum E0[]T QuickCheckShrink a fraction, preferring numbers with smaller numerators or denominators. See also U.U QuickCheckShrink a real number, preferring numbers with shorter decimal representations. See also T.V QuickCheck#Generic CoArbitrary implementation.W QuickCheckCombine two generator perturbing functions, for example the results of calls to  or ..X QuickCheckA .% implementation for integral numbers.Y QuickCheckA .! implementation for real numbers.Z QuickCheck. helper for lazy people :-).[ QuickCheckA . implementation for enums.\ QuickCheck#Generates a list of a given length.] QuickCheckGenerates an ordered list.^ QuickCheckGenerates an infinite list.c QuickCheck Generates  with non-empty non-negative  versionBranch , and empty  versionTagss QuickCheck!WARNING: The same warning as for Arbitrary (Set a) applies here.t QuickCheck!WARNING: The same warning as for Arbitrary (Set a) applies here.u QuickCheck!WARNING: The same warning as for Arbitrary (Set a) applies here.v QuickCheck!WARNING: The same warning as for Arbitrary (Set a) applies here.w QuickCheck/WARNING: Users working on the internals of the Set type via e.g. Data.Set.Internal should be aware that this instance aims to give a good representation of Set a as mathematical sets but *does not* aim to provide a varied distribution over the underlying representation. QuickCheck!WARNING: The same warning as for Arbitrary (Set a) applies here.2789-.456:;123<=BCDEFHKGIJLMN0/>@?VOAPQRTSUXYZ[W\]^2789-.456:;123<=BCDEFHKGIJLMN0/>@?VOAPQRTSUXYZ[W\]^5SafeI] Trustworthy7Q QuickCheckPrintableString: generates a printable unicode String. The string will not contain surrogate pairs. QuickCheck UnicodeString: generates a unicode String. The string will not contain surrogate pairs. QuickCheck ASCIIString: generates an ASCII string. QuickCheck Shrinking _ x2: allows for maintaining a state during shrinking. QuickCheck Smart _ x): tries a different order when shrinking. QuickCheck Shrink2 x<: allows 2 shrinking steps at the same time when shrinking x QuickCheckSmall x: generates values of x, drawn from a small range. The opposite of . QuickCheckLarge x#: by default, QuickCheck generates s drawn from a small range.  Large Int6 gives you values drawn from the entire range instead. QuickCheck NonPositive x: guarantees that x <= 0. QuickCheck NonNegative x: guarantees that x >= 0. QuickCheck NonZero x: guarantees that x /= 0. QuickCheck Negative x: guarantees that x < 0. QuickCheck Positive x: guarantees that x > 0. QuickCheck Sorted xs: guarantees that xs is sorted. QuickCheckInfiniteList xs _: guarantees that xs is an infinite list. When a counterexample is found, only prints the prefix of xs that was used by the program.%Here is a contrived example property: prop_take_10 :: InfiniteList Char -> Bool prop_take_10 (InfiniteList xs _) = or [ x == 'a' | x <- take 10 xs ]:In the following counterexample, the list must start with  "bbbbbbbbbb"9 but the remaining (infinite) part can contain anything:quickCheck prop_take_104*** Failed! Falsified (after 1 test and 14 shrinks):"bbbbbbbbbb" ++ ... QuickCheck NonEmpty xs": guarantees that xs is non-empty. QuickCheck Ordered xs : guarantees that xs is ordered. QuickCheckFixed x: as x, but will not be shrunk. QuickCheckBlind x): as x, but x does not have to be in the  class.;;Safe()*0=] QuickCheck4Generation of random shrinkable, showable functions."To generate random values of type  a b, you must have an instance  a. See also , and  with GHC >= 7.8. QuickCheck The class  Function a> is used for random generation of showable functions of type a -> b.&There is a default implementation for , which you can use if your type has structural equality. Otherwise, you can normally use  or . QuickCheck/The type of possibly partial concrete functions QuickCheck)A modifier for testing ternary functions. QuickCheck(A modifier for testing binary functions. prop_zipWith :: Fun (Int, Bool) Char -> [Int] -> [Bool] -> Bool prop_zipWith (Fn2 f) xs ys = zipWith f xs ys == [ f x y | (x, y) <- zip xs ys] QuickCheck!A modifier for testing functions. prop :: Fun String Integer -> Bool prop (Fn f) = f "banana" == f "monkey" || f "banana" == f "elephant" QuickCheck Provides a  instance for types with  and . Use only for small types (i.e. not integers): creates the list [..]! QuickCheck Provides a ! instance for small finite types. QuickCheck Provides a  instance for types with . QuickCheck Provides a  instance for types with . QuickCheck Provides a  instance for types with  and . QuickCheck Provides a " instance for types isomorphic to . An actual   instance is defined in quickcheck-instances. QuickCheckThe basic building block for  instances. Provides a < instance by mapping to and from a type that already has a  instance.  QuickCheck  QuickCheck  QuickCheck QuickCheckGeneric  implementation. QuickCheck Alias to . QuickCheck!Extracts the value of a function., is the pattern equivalent of this function. prop :: Fun String Integer -> Bool prop f = applyFun f "banana" == applyFun f "monkey" || applyFun f "banana" == applyFun f "elephant" QuickCheck(Extracts the value of a binary function., is the pattern equivalent of this function. prop_zipWith :: Fun (Int, Bool) Char -> [Int] -> [Bool] -> Bool prop_zipWith f xs ys = zipWith (applyFun2 f) xs ys == [ applyFun2 f x y | (x, y) <- zip xs ys] QuickCheck*Extracts the value of a ternary function. - is the pattern equivalent of this function.Safe] Safeh+ QuickCheck#The statistical parameters used by  checkCoverage. QuickCheck How certain  checkCoverage must be before the property fails. If the coverage requirement is met, and the certainty parameter is n7, then you should get a false positive at most one in n+ runs of QuickCheck. The default value is 10^9.Lower values will speed up  checkCoverage! at the cost of false positives.If you are using  checkCoverage< as part of a test suite, you should be careful not to set  certainty too low. If you want, say, a 1% chance of a false positive during a project's lifetime, then  certainty should be set to at least  100 * m * n, where m is the number of uses of cover in the test suite, and n is the number of times you expect the test suite to be run during the project's lifetime. The default value is chosen to be big enough for most projects. QuickCheckFor statistical reasons,  checkCoverage will not reject coverage levels that are only slightly below the required levels. If the required level is p then an actual level of  tolerance * p) will be accepted. The default value is 0.9.Lower values will speed up  checkCoverage9 at the cost of not detecting minor coverage violations. QuickCheckState represents QuickCheck's internal state while testing a property. The state is made visible to callback functions. QuickCheckthe current terminal QuickCheck)maximum number of successful tests needed QuickCheck5maximum number of discarded tests per successful test QuickCheckhow to compute the size of test cases from #tests and #discarded tests QuickCheck(How many shrinks to try before giving up QuickCheckSize to start at when replaying QuickCheckMaximum size of test QuickCheck/the current number of tests that have succeeded QuickCheck%the current number of discarded tests QuickCheck) :: Testable prop => Bool -> prop -> Property False ==> _ = property Discard True ==> p = property p QuickCheckThe class of properties, i.e., types which QuickCheck knows how to test. Typically a property will be a function returning  or . QuickCheck Convert the thing to a property. QuickCheckOptional; 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 ! instance for functions defines propertyForAllShrinkShow" in a way that improves shrinking. QuickCheckThe type of properties. QuickCheckDo I/O inside a property. QuickCheckDo I/O inside a property.?Warning: any random values generated inside of the argument to  ioProperty will not currently be shrunk. For best results, generate all random values before calling  ioProperty , or use  if that is safe. QuickCheckDo I/O inside a property.Warning: during shrinking, the I/O may not always be re-executed. Instead, the I/O may be executed once and then its result retained. If this is not acceptable, use  instead. QuickCheck Execute the IORose> bits of a rose tree, returning a tree constructed by MkRose. QuickCheckApply a function to the outermost MkRose constructor of a rose tree. The function must be total! QuickCheck)Wrap a rose tree in an exception handler. QuickCheckWrap the top level of a  in an exception handler. QuickCheck:Wrap all the Results in a rose tree in exception handlers. QuickCheckAdjust the test case size for a property, by transforming it with the given function. QuickCheckShrinks the argument to a property if it fails. Shrinking is done automatically for most types. This function is only needed when you want to override the default behavior. QuickCheckDisables shrinking for a property altogether. Only quantification inside the call to  is affected. QuickCheckAdds a callback QuickCheckAdds the given string to the counterexample if the property fails. QuickCheckAdds the given string to the counterexample if the property fails. QuickCheck Performs an - action after the last failure of a property. QuickCheck Performs an  action every time a property fails. Thus, if shrinking is done, this can be used to keep track of the failures along the way. QuickCheckPrints out the generated test case every time the property is tested. Only variables quantified over inside the  are printed.:Note: for technical reasons, the test case is printed out after the property is tested. To debug a property that goes into an infinite loop, use  to add a timeout instead. QuickCheckPrints out the generated test case every time the property fails, including during shrinking. Only variables quantified over inside the  are printed.:Note: for technical reasons, the test case is printed out after the property is tested. To debug a property that goes into an infinite loop, use  to add a timeout instead. QuickCheckIndicates that a property is supposed to fail. QuickCheck will report an error if it does not fail. QuickCheckModifies a property so that it only will be tested once. Opposite of . QuickCheckModifies a property so that it will be tested repeatedly. Opposite of . QuickCheck4Configures how many times a property will be tested. For example, "quickCheck (withMaxSuccess 1000 p) will test p up to 1000 times. QuickCheckConfigures how many times a property is allowed to be discarded before failing. For example, "quickCheck (withDiscardRatio 10 p) will allow p, to fail up to 10 times per successful test. QuickCheckConfigure the maximum number of times a property will be shrunk. For example, !quickCheck (withMaxShrinks 100 p) will cause p( to only attempt 100 shrinks on failure. QuickCheck8Configure the maximum size a property will be tested at. QuickCheckReturn a value in the  witnesses field of the  returned by quickCheckResult+. Witnesses are returned outer-most first.In ghci, for example:[Wit x] <- fmap witnesses . quickCheckResult $ \ x -> witness x $ x == (0 :: Int)&*** Failed! Falsified (after 2 tests):1x1:t xx :: Int QuickCheck0Check that all coverage requirements defined by  and  are met, using a statistically sound test, and fail if they are not met.Ordinarily, a failed coverage check does not cause the property to fail. This is because the coverage requirement is not tested in a statistically sound way. If you use  to express that a certain value must appear 20% of the time, QuickCheck will warn you if the value only appears in 19 out of 100 test cases - but since the coverage varies randomly, you may have just been unlucky, and there may not be any real problem with your test generation. When you use , QuickCheck uses a statistical test to account for the role of luck in coverage failures. It will run as many tests as needed until it is sure about whether the coverage requirements are met. If a coverage requirement is not met, the property fails.Example: #quickCheck (checkCoverage prop_foo) QuickCheckCheck coverage requirements using a custom confidence level. See .An example of making the statistical test less stringent in order to improve performance: quickCheck (checkCoverageWith stdConfidence{certainty = 10^6} prop_foo) QuickCheck The standard parameters used by : certainty = 10^9, tolerance = 0.9. See # for the meaning of the parameters. QuickCheckAttaches a label to a test case. This is used for reporting test case distribution. For example: prop_reverse_reverse :: [Int] -> Property prop_reverse_reverse xs = label ("length of input is " ++ show (length xs)) $ reverse (reverse xs) === xsquickCheck prop_reverse_reverse+++ OK, passed 100 tests:7% length of input is 76% length of input is 35% length of input is 44% length of input is 6... Each use of  in your property results in a separate table of test case distribution in the output. If this is not what you want, use . QuickCheckAttaches a label to a test case. This is used for reporting test case distribution. collect x = label (show x) For example: prop_reverse_reverse :: [Int] -> Property prop_reverse_reverse xs = collect (length xs) $ reverse (reverse xs) === xsquickCheck prop_reverse_reverse+++ OK, passed 100 tests:7% 76% 35% 44% 6... Each use of  in your property results in a separate table of test case distribution in the output. If this is not what you want, use . QuickCheck6Reports how many test cases satisfy a given condition. For example: prop_sorted_sort :: [Int] -> Property prop_sorted_sort xs = sorted xs ==> classify (length xs > 1) "non-trivial" $ sort xs === xsquickCheck prop_sorted_sort++++ OK, passed 100 tests (22% non-trivial). QuickCheck-Checks that at least the given proportion of  successful test cases belong to the given class. Discarded tests (i.e. ones with a false precondition) do not affect coverage.Note: If the coverage check fails, QuickCheck prints out a warning, but the property does not& fail. To make the property fail, use . For example: prop_sorted_sort :: [Int] -> Property prop_sorted_sort xs = sorted xs ==> cover 50 (length xs > 1) "non-trivial" $ sort xs === xsquickCheck prop_sorted_sort:+++ OK, passed 100 tests; 135 discarded (26% non-trivial).&Only 26% non-trivial, but expected 50% QuickCheckCollects information about test case distribution into a table. The arguments to  are the table's name and a list of values associated with the current test case. After testing, QuickCheck prints the frequency of all collected values. The frequencies are expressed as a percentage of the total number of values collected.You should prefer  to  when each test case is associated with a varying number of values. Here is a (not terribly useful) example, where the test data is a list of integers and we record all values that occur in the list: prop_sorted_sort :: [Int] -> Property prop_sorted_sort xs = sorted xs ==> tabulate "List elements" (map show xs) $ sort xs === xsquickCheck prop_sorted_sort )+++ OK, passed 100 tests; 1684 discarded.List elements (109 in total): 3.7% 0 3.7% 17 3.7% 2 3.7% 6 2.8% -6 2.8% -7Here is a more useful example. We are testing a chatroom, where the user can log in, log out, or send a message: data Command = LogIn | LogOut | SendMessage String deriving (Data, Show) instance Arbitrary Command where ...There are some restrictions on command sequences; for example, the user must log in before doing anything else. The function valid :: [Command] -> Bool checks that a command sequence is allowed. Our property then has the form: prop_chatroom :: [Command] -> Property prop_chatroom cmds = valid cmds ==> ... The use of ) may skew test case distribution. We use 2 to see the length of the command sequences, and 4 to get the frequencies of the individual commands: prop_chatroom :: [Command] -> Property prop_chatroom cmds = wellFormed cmds LoggedOut ==> 'collect' (length cmds) $ 'tabulate' "Commands" (map (show . 'Data.Data.toConstr') cmds) $ ... Property prop_chatroom cmds = wellFormed cmds LoggedOut ==> 'tabulate' "Commands" (map (show . 'Data.Data.toConstr') cmds) $ ......we can add a coverage requirement as follows, which checks that LogIn, LogOut and  SendMessage% each occur at least 25% of the time: prop_chatroom :: [Command] -> Property prop_chatroom cmds = wellFormed cmds LoggedOut ==> coverTable "Commands" [("LogIn", 25), ("LogOut", 25), ("SendMessage", 25)] $ 'tabulate' "Commands" (map (show . 'Data.Data.toConstr') cmds) $ ... property goes here ...quickCheck prop_chatroom)+++ OK, passed 100 tests; 2909 discarded:56% 017% 110% 2 6% 3 5% 4 3% 5 3% 7Commands (111 in total): 51.4% LogIn30.6% SendMessage 18.0% LogOut:Table 'Commands' had only 18.0% LogOut, but expected 25.0% QuickCheckImplication for properties: The resulting property holds if the first argument is  (in which case the test case is discarded), or if the given property holds. Note that using implication carelessly can severely skew test case distribution: consider using 9 to make sure that your test data is still good quality. QuickCheckConsiders a property failed if it does not complete within the given number of microseconds.Note: if the property times out, variables quantified inside the 0 will not be printed. Therefore, you should use $ only in the body of your property.Good: #prop_foo a b c = within 1000000 ...Bad: )prop_foo = within 1000000 $ \a b c -> ...Bad: prop_foo a b c = ...; main = quickCheck (within 1000000 prop_foo) QuickCheckDiscards the test case if it does not complete within the given number of microseconds. This can be useful when testing algorithms that have pathological cases where they run extremely slowly. QuickCheckExplicit universal quantification: uses an explicitly given test case generator. QuickCheckLike -, but with an explicitly given show function. QuickCheckLike +, but without printing the generated value. QuickCheckLike :, but tries to shrink the argument for failing test cases. QuickCheckLike -, but with an explicitly given show function. QuickCheckLike +, but without printing the generated value. QuickCheckNondeterministic choice: p1  p2 picks randomly one of p1 and p2 to test. If you test the property 100 times it makes 100 random choices. QuickCheck Conjunction: p1  p2 passes if both p1 and p2 pass. QuickCheck+Take the conjunction of several properties. QuickCheck Disjunction: p1  p2 passes unless p1 and p2 simultaneously fail. QuickCheck+Take the disjunction of several properties. QuickCheckLike ,, but prints a counterexample when it fails. QuickCheckLike ,, but prints a counterexample when it fails. QuickCheckChecks that a value is total, i.e., doesn't crash when evaluated. QuickCheck9-like function. QuickCheckThe original argument QuickCheckTrue% if the test case should be labelled. QuickCheckLabel. QuickCheck.The required percentage (0-100) of test cases. QuickCheckTrue' if the test case belongs to the class. QuickCheckLabel for the test case class.011144 Trustworthy7( QuickCheck!Result represents the test result QuickCheckA successful test run QuickCheckGiven up QuickCheckA failed test run QuickCheck*A property that should have failed did not QuickCheckNumber of tests performed QuickCheckNumber of tests skipped QuickCheckThe number of test cases having each combination of labels (see ) QuickCheck0The number of test cases having each class (see ) QuickCheckData collected by  QuickCheckPrinted output QuickCheck.Number of successful shrinking steps performed QuickCheck0Number of unsuccessful shrinking steps performed QuickCheckNumber of unsuccessful shrinking steps performed since last successful shrink QuickCheckWhat seed was used QuickCheckWhat was the test size QuickCheckWhy did the property fail QuickCheck(The exception the property threw, if any QuickCheck(The test case which provoked the failure QuickCheckThe test case's labels (see ) QuickCheckThe test case's classes (see ) QuickCheck3The existentially quantified witnesses provided by  QuickCheck1Args specifies arguments to the QuickCheck driver QuickCheckShould we replay a previous test? Note: saving a seed from one version of QuickCheck and replaying it in another is not supported. If you want to store a test case permanently you should save the test case itself. QuickCheckMaximum number of successful tests before succeeding. Testing stops at the first failure. If all tests are passing and you want to run more tests, increase this number. QuickCheckMaximum number of discarded tests per successful test before giving up QuickCheck&Size to use for the biggest test cases QuickCheckWhether to print anything QuickCheckMaximum number of shrinks to do before giving up. Setting this to zero turns shrinking off. QuickCheck*Check if the test run result was a success QuickCheckThe default test arguments QuickCheck+Tests a property and prints the results to stdout.By default up to 100 tests are performed, which may not be enough to find all bugs. To run more tests, use .If you want to get the counterexample as a Haskell value, rather than just printing it, try the  http://hackage.haskell.org/package/quickcheck-with-counterexamplesquickcheck-with-counterexamples package. QuickCheckTests a property, using test arguments, and prints the results to stdout. QuickCheckTests a property, produces a test result, and prints the results to stdout. QuickCheckTests a property, using test arguments, produces a test result, and prints the results to stdout. QuickCheckRe-run a property with the seed and size that failed in a run of . QuickCheckTests a property and prints the results and all test cases generated to stdout>. This is just a convenience function that means the same as  . .:Note: for technical reasons, the test case is printed out after the property is tested. To debug a property that goes into an infinite loop, use  to add a timeout instead. QuickCheckTests a property, using test arguments, and prints the results and all test cases generated to stdout5. This is just a convenience function that combines  and .:Note: for technical reasons, the test case is printed out after the property is tested. To debug a property that goes into an infinite loop, use  to add a timeout instead. QuickCheckTests a property, produces a test result, and prints the results and all test cases generated to stdout5. This is just a convenience function that combines  and .:Note: for technical reasons, the test case is printed out after the property is tested. To debug a property that goes into an infinite loop, use  to add a timeout instead. QuickCheckTests a property, using test arguments, produces a test result, and prints the results and all test cases generated to stdout5. This is just a convenience function that combines  and .:Note: for technical reasons, the test case is printed out after the property is tested. To debug a property that goes into an infinite loop, use  to add a timeout instead.Safe QuickCheckThe property monad is really a monad transformer that can contain monadic computations in the monad m it is parameterized by:m - the m+-computations that may be performed within  PropertyM Elements of  PropertyM m a! may mix property operations and m-computations. QuickCheck:Allows embedding non-monadic properties into monadic ones. QuickCheckLike  but allows caller to specify an explicit message to show on failure.Example: do assertWith True "My first predicate." assertWith False "My other predicate." ... Assertion failed (after 2 tests): Passed: My first predicate Failed: My other predicate  QuickCheckTests preconditions. Unlike  this does not cause the property to fail, rather it discards them just like using the implication combinator .This allows representing the )https://en.wikipedia.org/wiki/Hoare_logic Hoare triple  {p} x C e{q}as pre p x <- run e assert q  QuickCheckThe lifting operation of the property monad. Allows embedding monadic/-actions in properties: log :: Int -> IO () prop_foo n = monadicIO $ do run (log n) -- ...  QuickCheck8Quantification in a monadic property, fits better with  do-notation than . Note: values generated by  do not shrink. QuickCheckThe https://en.wikipedia.org/wiki/Predicate_transformer_semantics#Weakest_preconditionsweakest precondition  wp(x C e, p)can be expressed as in code as wp e (\x -> p). QuickCheck(Quantification in monadic properties to , with a notation similar to . Note: values generated by  do not shrink. QuickCheck/Allows making observations about the test data:  monitor ( e) &collects the distribution of value of e.  monitor ( "Failure!") Adds  "Failure!" to the counterexamples. QuickCheckRuns the property monad for -computations. >prop_cat msg = monadicIO $ do (exitCode, stdout, _) <- run ( "cat" [] msg) pre (( == exitCode) assert (stdout == msg) quickCheck prop_cat+++ OK, passed 100 tests. QuickCheckRuns the property monad for -computations. -- Your mutable sorting algorithm here sortST :: Ord a => [a] ->  s (MVector s a) sortST =  .  . 4 prop_sortST xs = monadicST $ do sorted <- run ( =<< sortST xs) assert ( sorted == sort xs) quickCheck prop_sortST+++ OK, passed 100 tests. QuickCheckEvaluate the value to Weak Head Normal Form (WHNF) and fail if it does not result in an expected exception being thrown. QuickCheckMake sure that a specific exception is thrown during an IO action. The result is evaluated to WHNF. QuickCheckSame as , but evaluate the value to Normal Form (NF) and fail if it does not result in an expected exception being thrown. QuickCheckMake sure that a specific exception is thrown during an IO action. The result is evaluated to NF. QuickCheckReturn + if that is the exception that was expected QuickCheckValue that should result in an exception, when evaluated to WHNF QuickCheckReturn + if that is the exception that was expected QuickCheck2An action that should throw the expected exception QuickCheck6Return True if that is the exception that was expected QuickCheckValue that should result in an exception, when fully evaluated to NF QuickCheck6Return True if that is the exception that was expected QuickCheck2An action that should throw the expected exception  Trustworthy QuickCheck>Test a polymorphic property, defaulting all type variables to . Invoke as $( 'prop), where prop+ is a property. Note that just evaluating  prop in GHCi will seem to work, but will silently default all type variables to ()!$( 'prop) means the same as  $( 'prop)-. If you want to supply custom arguments to , you will have to combine  and  yourself.If you want to use  in the same file where you defined the property, the same scoping problems pop up as in : see the note there about  return []. QuickCheck>Test a polymorphic property, defaulting all type variables to 5. This is just a convenience function that combines  and .If you want to use  in the same file where you defined the property, the same scoping problems pop up as in : see the note there about  return []. QuickCheckMonomorphise an arbitrary property by defaulting all type variables to .For example, if f has type  a => [a] -> [a] then $( 'f) has type [] -> [].If you want to use  in the same file where you defined the property, the same scoping problems pop up as in : see the note there about  return []. QuickCheck;Test all properties in the current module, using a custom $ function. The same caveats as with  apply.$ has type ( ->  ) ->  . An example invocation is $  , which does the same thing as $.$ has the same issue with scoping as : see the note there about  return []. QuickCheck*List all properties in the current module.$ has type [(, )].$ has the same issue with scoping as : see the note there about  return []. QuickCheckTest all properties in the current module. The name of the property must begin with prop_/. Polymorphic properties will be defaulted to  . Returns  if all tests succeeded,  otherwise.To use 5, add a definition to your module along the lines of #return [] runTests = $quickCheckAlland then execute runTests.Note: the bizarre  return [] in the example above is needed on GHC 7.8 and later; without it,  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 1 can see everything that was defined before the  return []. Yikes! QuickCheckTest all properties in the current module. This is just a convenience function that combines  and .$ has the same issue with scoping as : see the note there about  return []. Safe QuickCheck!Given a property, which must use , ,  or  to associate labels with test cases, find an example test case for each possible label. The example test cases are minimised using shrinking.For example, suppose we test ! x xs& and record the number of times that x occurs in xs: prop_delete :: Int -> [Int] -> Property prop_delete x xs = classify (count x xs == 0) "count x xs == 0" $ classify (count x xs == 1) "count x xs == 1" $ classify (count x xs >= 2) "count x xs >= 2" $ counterexample (show (delete x xs)) $ count x (delete x xs) == max 0 (count x xs-1) where count x xs = length (filter (== x) xs)8 generates three example test cases, one for each label:labelledExamples prop_delete$*** Found example of count x xs == 00[][]$*** Found example of count x xs == 10[0][]$*** Found example of count x xs >= 25[5,5][5]+++ OK, passed 100 tests:78% count x xs == 021% count x xs == 1 1% count x xs >= 2 QuickCheck A variant of  that takes test arguments. QuickCheck A variant of  that returns a result. QuickCheck A variant of 0 that takes test arguments and returns a result.Safe%789>@?OAPQRTSU456:;123<=  BCD !"\#^]EFGKHIJLMN-.VXYZ[W789>@?OAPQRTSU456:;123<=  BCD !"\#^]EFGKHIJLMN-.VXYZ[W "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                              *QuickCheck-2.15.0.1-JyXbAFb7UipIPAKrEhXkquTest.QuickCheckTest.QuickCheck.GenTest.QuickCheck.Gen.UnsafeTest.QuickCheck.ArbitraryTest.QuickCheck.PolyTest.QuickCheck.ModifiersTest.QuickCheck.FunctionTest.QuickCheck.MonadicTest.QuickCheck.All QuickCheckTest.QuickCheck.Exception==>Test.QuickCheck.RandomFun Data.VoidVoidTest.QuickCheck.TextTest.QuickCheck.StateTest.QuickCheck.PropertyTest.QuickCheck.TestSystem.ProcessreadProcessWithExitCode System.Exit ExitSuccess Data.VectorthawfromList Data.ListsortfreezetoListTest.QuickCheck.FeaturesdeletediscardGenMkGenunGenvariantsizedgetSizeresizescalechoose chooseAny chooseEnum chooseIntchooseBoundedIntegral chooseInteger chooseWord64 chooseInt64 chooseUpTogeneratesample'sample genDoublegenFloatsuchThat suchThatMap suchThatMaybeoneof frequencyelements sublistOfshufflegrowingElementslistOflistOf1vectorOfinfiniteListOf $fMonadFixGen $fMonadGen$fApplicativeGen $fFunctorGenCapturepromotedelaycapture CoArbitrary coarbitrary GSubtermsRecursivelyShrink Arbitrary2liftArbitrary2 liftShrink2 Arbitrary1 liftArbitrary liftShrink Arbitrary arbitraryshrink arbitrary1shrink1 arbitrary2shrink2 genericShrinkrecursivelyShrinksubterms shrinkListapplyArbitrary2applyArbitrary3applyArbitrary4arbitrarySizedIntegralarbitrarySizedNaturalarbitrarySizedFractionalarbitraryBoundedIntegralarbitraryBoundedRandomarbitraryBoundedEnumarbitrarySizedBoundedIntegralarbitraryUnicodeChararbitraryASCIIChararbitraryPrintableChar shrinkNothing shrinkMap shrinkMapByshrinkIntegralshrinkBoundedEnumshrinkRealFrac shrinkDecimalgenericCoarbitrary><coarbitraryIntegralcoarbitraryRealcoarbitraryShowcoarbitraryEnumvector orderedList infiniteList$fArbitraryNewlineMode$fArbitraryNewline$fArbitraryExitCode$fArbitraryQCGen$fArbitraryVersion$fArbitraryAlt$fArbitraryLast$fArbitraryFirst$fArbitraryProduct$fArbitrarySum$fArbitraryAny$fArbitraryAll$fArbitraryDual$fArbitraryWrappedArrow$fArbitraryWrappedMonad$fArbitraryConst$fArbitraryConstant$fArbitraryIdentity$fArbitraryZipList$fArbitraryTree$fArbitrarySeq$fArbitraryIntMap$fArbitraryIntSet$fArbitraryMap$fArbitrarySet$fArbitraryCDouble$fArbitraryCFloat$fArbitraryCSUSeconds$fArbitraryCUSeconds$fArbitraryCTime$fArbitraryCClock$fArbitraryCUIntMax$fArbitraryCIntMax$fArbitraryCUIntPtr$fArbitraryCIntPtr$fArbitraryCULLong$fArbitraryCLLong$fArbitraryCSigAtomic$fArbitraryCWchar$fArbitraryCSize$fArbitraryCPtrdiff$fArbitraryCULong$fArbitraryCLong$fArbitraryCUInt$fArbitraryCInt$fArbitraryCUShort$fArbitraryCShort$fArbitraryCUChar$fArbitraryCSChar$fArbitraryCChar$fArbitraryDouble$fArbitraryFloat$fArbitraryChar$fArbitraryWord64$fArbitraryWord32$fArbitraryWord16$fArbitraryWord8$fArbitraryWord$fArbitraryInt64$fArbitraryInt32$fArbitraryInt16$fArbitraryInt8$fArbitraryInt$fArbitraryInteger$fArbitrary(,,,,,,,,,)$fArbitrary(,,,,,,,,)$fArbitrary(,,,,,,,)$fArbitrary(,,,,,,)$fArbitrary(,,,,,)$fArbitrary(,,,,)$fArbitrary(,,,)$fArbitrary(,,)$fArbitrary(,)$fArbitraryFixed$fArbitraryComplex$fArbitraryRatio$fArbitraryList$fArbitraryEither$fArbitraryMaybe$fArbitraryOrdering$fArbitraryBool $fArbitrary()$fArbitraryCompose$fArbitrary1Compose$fArbitraryProduct0$fArbitrary1Product$fArbitrary1Identity$fArbitrary1ZipList$fArbitrary1Seq$fArbitrary1IntMap$fArbitrary1Map$fArbitrary1List$fArbitrary1Maybe$fArbitrary1Const$fArbitrary2Const$fArbitrary1Constant$fArbitrary2Constant$fArbitrary1Tree$fArbitrary1(,)$fArbitrary2(,)$fArbitrary1Either$fArbitrary2Either$fRecursivelyShrinkkV1$fRecursivelyShrinkkU1$fRecursivelyShrinkkK1$fRecursivelyShrinkkM1$fRecursivelyShrinkk:+:$fRecursivelyShrinkk:*:$fGSubtermsK1b$fGSubtermsM1a$fGSubtermsU1a$fGSubtermsV1a$fGSubtermsInclK1b$fGSubtermsInclK1a$fGSubtermsInclM1a$fGSubtermsIncl:+:a$fGSubtermsIncl:*:a$fGSubtermsInclU1a$fGSubtermsInclV1a$fGSubterms:+:a$fGSubterms:*:a$fGCoArbitrarykM1$fGCoArbitraryk:+:$fGCoArbitraryk:*:$fGCoArbitrarykU1$fCoArbitraryNewlineMode$fCoArbitraryNewline$fCoArbitraryVersion$fCoArbitraryAlt$fCoArbitraryLast$fCoArbitraryFirst$fCoArbitraryProduct$fCoArbitrarySum$fCoArbitraryAny$fCoArbitraryAll$fCoArbitraryEndo$fCoArbitraryDual$fCoArbitraryConst$fCoArbitraryConstant$fCoArbitraryIdentity$fCoArbitraryZipList$fCoArbitraryTree$fCoArbitrarySeq$fCoArbitraryIntMap$fCoArbitraryIntSet$fCoArbitraryMap$fCoArbitrarySet$fCoArbitraryDouble$fCoArbitraryFloat$fCoArbitraryChar$fCoArbitraryWord64$fCoArbitraryWord32$fCoArbitraryWord16$fCoArbitraryWord8$fCoArbitraryWord$fCoArbitraryInt64$fCoArbitraryInt32$fCoArbitraryInt16$fCoArbitraryInt8$fCoArbitraryInt$fCoArbitraryInteger$fCoArbitrary(,,,,)$fCoArbitrary(,,,)$fCoArbitrary(,,)$fCoArbitrary(,)$fCoArbitraryComplex$fCoArbitraryFixed$fCoArbitraryRatio$fCoArbitraryList$fCoArbitraryEither$fCoArbitraryMaybe$fCoArbitraryOrdering$fCoArbitraryBool$fCoArbitrary()$fCoArbitraryFUN$fGCoArbitrarykK1$fArbitraryEndo$fArbitraryFUN$fArbitrary1FUNOrdCunOrdCOrdBunOrdBOrdAunOrdACunCBunBAunA$fCoArbitraryA $fArbitraryA$fShowA$fCoArbitraryB $fArbitraryB$fShowB$fCoArbitraryC $fArbitraryC$fShowC$fCoArbitraryOrdA$fArbitraryOrdA $fShowOrdA $fNumOrdA$fCoArbitraryOrdB$fArbitraryOrdB $fShowOrdB $fNumOrdB$fCoArbitraryOrdC$fArbitraryOrdC $fShowOrdC $fNumOrdC$fEqOrdC $fOrdOrdC$fEqOrdB $fOrdOrdB$fEqOrdA $fOrdOrdA$fEqC$fEqB$fEqAPrintableStringgetPrintableString UnicodeStringgetUnicodeString ASCIIStringgetASCIIString ShrinkState shrinkInit shrinkState ShrinkingSmartShrink2 getShrink2SmallgetSmallLargegetLarge NonPositivegetNonPositive NonNegativegetNonNegativeNonZero getNonZeroNegative getNegativePositive getPositive SortedListSorted getSorted InfiniteListgetInfiniteListinfiniteListInternalData NonEmptyListNonEmpty getNonEmpty OrderedListOrdered getOrderedFixedgetFixedBlindgetBlind$fArbitraryBlind $fShowBlind$fFunctorBlind$fFunctorFixed$fArbitraryOrderedList$fFunctorOrderedList$fArbitraryNonEmptyList$fFunctorNonEmptyList#$fArbitraryInfiniteListInternalData$fArbitraryInfiniteList$fShowInfiniteList$fArbitrarySortedList$fFunctorSortedList$fArbitraryPositive$fFunctorPositive$fArbitraryNegative$fFunctorNegative$fArbitraryNonZero$fFunctorNonZero$fArbitraryNonNegative$fFunctorNonNegative$fArbitraryNonPositive$fFunctorNonPositive$fArbitraryLarge$fFunctorLarge$fArbitrarySmall$fFunctorSmall$fArbitraryShrink2$fFunctorShrink2$fArbitrarySmart $fShowSmart$fFunctorSmart$fShowShrinking$fFunctorShrinking$fArbitraryShrinking$fArbitraryASCIIString$fArbitraryUnicodeString$fArbitraryPrintableString$fEqPrintableString$fOrdPrintableString$fShowPrintableString$fReadPrintableString$fEqUnicodeString$fOrdUnicodeString$fShowUnicodeString$fReadUnicodeString$fEqASCIIString$fOrdASCIIString$fShowASCIIString$fReadASCIIString $fEqShrink2 $fOrdShrink2 $fShowShrink2 $fReadShrink2 $fNumShrink2$fIntegralShrink2 $fRealShrink2 $fEnumShrink2 $fEqSmall $fOrdSmall $fShowSmall $fReadSmall $fNumSmall$fIntegralSmall $fRealSmall $fEnumSmall $fIxSmall $fEqLarge $fOrdLarge $fShowLarge $fReadLarge $fNumLarge$fIntegralLarge $fRealLarge $fEnumLarge $fIxLarge$fEqNonPositive$fOrdNonPositive$fShowNonPositive$fReadNonPositive$fEnumNonPositive$fEqNonNegative$fOrdNonNegative$fShowNonNegative$fReadNonNegative$fEnumNonNegative $fEqNonZero $fOrdNonZero $fShowNonZero $fReadNonZero $fEnumNonZero $fEqNegative $fOrdNegative$fShowNegative$fReadNegative$fEnumNegative $fEqPositive $fOrdPositive$fShowPositive$fReadPositive$fEnumPositive$fEqSortedList$fOrdSortedList$fShowSortedList$fReadSortedList$fEqNonEmptyList$fOrdNonEmptyList$fShowNonEmptyList$fReadNonEmptyList$fEqOrderedList$fOrdOrderedList$fShowOrderedList$fReadOrderedList $fEqFixed $fOrdFixed $fShowFixed $fReadFixed $fNumFixed$fIntegralFixed $fRealFixed $fEnumFixed $fEqBlind $fOrdBlind $fNumBlind$fIntegralBlind $fRealBlind $fEnumBlindFunctionfunction:->Fn3Fn2FnfunctionBoundedEnumfunctionElementsfunctionRealFracfunctionIntegral functionShow functionVoid functionMapfunctionMapWithfunctionPairWithfunctionEitherWithapplyapplyFun applyFun2 applyFun3 $fShow:-> $fFunctor:->$fGFunctionkM1$fGFunctionk:+:$fGFunctionk:*:$fGFunctionkU1$fGFunctionkK1$fArbitrary:->$fFunctionOrdC$fFunctionOrdB$fFunctionOrdA $fFunctionC $fFunctionB $fFunctionA $fFunctionAlt$fFunctionLast$fFunctionFirst$fFunctionProduct $fFunctionSum $fFunctionAny $fFunctionAll$fFunctionDual$fFunctionNewlineMode$fFunctionNewline$fFunctionWord64$fFunctionWord32$fFunctionWord16$fFunctionWord8$fFunctionInt64$fFunctionInt32$fFunctionInt16$fFunctionInt8$fFunctionTree $fFunctionSeq$fFunctionIntMap$fFunctionIntSet $fFunctionMap $fFunctionSet$fFunctionComplex$fFunctionFixed$fFunctionRatio$fFunctionOrdering$fFunctionDouble$fFunctionFloat$fFunctionChar$fFunctionWord $fFunctionInt$fFunctionInteger$fFunctionBool$fFunctionMaybe$fFunctionList$fFunction(,,,,,,)$fFunction(,,,,,)$fFunction(,,,,)$fFunction(,,,)$fFunction(,,)$fFunctionEither $fFunction(,)$fFunctionIdentity$fFunctionConst $fFunction()$fArbitraryFun $fShowFun $fFunctorFun $fEqShrunk Confidence certainty toleranceWitnessWitDiscardTestablepropertypropertyForAllShrinkShowProperty ioPropertyidempotentIOProperty coerceWitness castWitnessmapSize shrinking noShrinkingcounterexample printTestCasewhenFail whenFail'verboseverboseShrinking expectFailureonceagainwithMaxSuccesswithDiscardRatiowithMaxShrinks withMaxSizewitness checkCoveragecheckCoverageWith stdConfidencelabelcollectclassifycovertabulate coverTablewithin discardAfterforAll forAllShow forAllBlind forAllShrinkforAllShrinkShowforAllShrinkBlind.&..&&.conjoin.||.disjoin====/=totalResultSuccessGaveUpFailureNoExpectedFailurenumTests numDiscardedlabelsclassestablesoutput numShrinksnumShrinkTriesnumShrinkFinalusedSeedusedSizereason theExceptionfailingTestCase failingLabelsfailingClasses witnessesArgsreplay maxSuccessmaxDiscardRatiomaxSizechatty maxShrinks isSuccessstdArgs quickCheckquickCheckWithquickCheckResultquickCheckWithResultrecheck verboseCheckverboseCheckWithverboseCheckResultverboseCheckWithResult PropertyM MkPropertyM unPropertyMstopassert assertWithprerunpickwpforAllMmonitormonadicmonadic' monadicIO monadicSTrunSTGenassertExceptionassertExceptionIOassertDeepExceptionassertDeepExceptionIO$fMonadIOPropertyM$fMonadTransPropertyM$fMonadFailPropertyM$fMonadPropertyM$fApplicativePropertyM$fFunctorPropertyMpolyQuickCheckpolyVerboseCheck monomorphicforAllProperties allProperties quickCheckAllverboseCheckAlllabelledExampleslabelledExamplesWithlabelledExamplesResultlabelledExamplesWithResult isInterrupt AnException tryEvaluate tryEvaluateIOevaluate isDiscardfinallyQCGen'splitmix-0.1.0.5-KCwbtTlf7pHGjxbjP52RTJSystem.Random.SplitMixSMGen%random-1.2.1.2-BueTXQ4cpBz2A3gkI9h8O2System.Random.InternalStdGen Splittablerightleft wrapQCGennewQCGenmkQCGenintegerVariantghc-prim GHC.TypesInt ghc-bignumGHC.Num.IntegerIntegerDoubleFloatbase GHC.MaybeJust GHC.GenericsGeneric gSubtermsIncl gSubterms:*::+: Data.VersionVersion:<GHC.ShowShowGHC.EnumBoundedEnumminBoundmaxBoundGHC.RealRealFracIntegralGHC.ReadReadgenericFunctionStrMkStrrangesnumbershortshowErroneLine isOneLineboldljustrjustcentrelpercentrpercent lpercentage rpercentage drawTableCellLJustRJustCentred paragraphs newTerminalwithStdioTerminalwithHandleTerminalwithNullTerminalterminalOutputhandleTerminalputTempputPartputLineStateterminalmaxSuccessTestsmaxDiscardedRatiocoverageConfidencenumTotMaxShrinksreplayStartSize maxTestSizenumSuccessTestsnumDiscardedTestsnumRecentlyDiscardedTestsrequiredCoverageexpected randomSeednumSuccessShrinks numTryShrinksnumTotTryShrinksMkStateokexpectabort maybeNumTestsmaybeCheckCoveragemaybeDiscardedRatiomaybeMaxShrinksmaybeMaxTestSize callbackstestCaseCounterexampleNotCounterexampleCallbackPostTestPostFinalFailureBoolmorallyDubiousIOProperty reduceRoseonRose protectRose protectPropPropprotectResultscallbackIOFalse GHC.Classes==/= theWitnessesMkResult CallbackKindRoseIORoseMkRoseunPropMkProp unProperty MkPropertyprotectioRosejoinRose exceptionformatException protectResult succeededfailedrejectedliftBool mapResultmapTotalResult mapRoseResultmapPropshowCounterexample onTimeout withState computeSizeclamptestfinishedSuccessfullyfinishedInsufficientCoveragetooManyDiscardscheckingCoveragetimeToCheckCoveragecoverageKnownSufficientcoverageKnownInsufficient failCoverage doneTestinggiveUp showTestCountformatTestCountrunATestfailureSummary failureReasonfailureSummaryAndReasonsuccesslabelsAndTables showTable foundFailurelocalMin localMin' localMinFoundcallbackPostTestcallbackPostFinalFailuresufficientlyCoveredinsufficientlyCoveredwilson wilsonLow wilsonHigh invnormcdf allCoverageGHC.STSTTrueOrdGHC.BaseStringfeaturesprop_noNewFeatures