This is QuickCheck 2, a library for random testing of program properties.

Install it in the usual way:

$ cabal install

Please report bugs to the QuickCheck mailing list at

If you get errors about Template Haskell, try

$ cabal install -f-templateHaskell

but please report this as a bug.


QuickCheck 2.9.2 (released 2016-09-15)
* Fix a bug where some properties were only being tested once
* Make shrinking of floating-point values less aggressive
* Add function chooseAny :: Random a => Gen a

QuickCheck 2.9.1 (released 2016-07-11)
* 'again' was only used in forAllShrink, not forAll

QuickCheck 2.9 (released 2016-07-10)
* Arbitrary, CoArbitrary and Function instances for more types
* Generics for automatic Function instances
* A new combinator "again" which undoes the effect of "once"
* Remove "exhaustive" from Testable typeclass;
instead, combinators which are nonexhaustive (such as forAll)
call "again", which should be more robust

* Drop support for GHC 6.x

* Fixed bugs:
* arbitrarySizedBoundedIntegral wasn't generating huge integers
* verboseCheck failed with Test.QuickCheck.Function
* label had a space leak

QuickCheck 2.8.2 (released 2016-01-15)
* GHC 8 support
* Add Arbitrary and CoArbitrary instances for types in
containers package
* Improve speed of shuffle combinator
* Only print to stderr if it's a terminal.
* Small changes: slightly improve documentation,
remove redundant constraints from some functions' types,
small improvements to Test.QuickCheck.All.

QuickCheck 2.8.1 (released 2015-04-03)
* Fix bug where exceptions thrown printing counterexamples weren't
being caught when terminal output was disabled
* Don't export Test.QuickCheck.Property.result

QuickCheck 2.8 (released 2015-03-18)
* New features:
* Support for GHC 7.10
* Arbitrary instance for Natural
* New generators shuffle and sublistOf
* Support for generic coarbitrary
* When using the cover combinator, insufficient coverage now
causes the property to fail

* API changes:
* Test.QuickCheck.Function: new pattern synonym Fn
* genericShrink no longer requires Typeable
* Result has a new constructor InsufficientCoverage
* resize throws an error if the size is negative

* Bug fixes:
* Fix memory leaks
* Exceptions thrown by callbacks now cause the test to fail
* Fixed a bug where the cover combinator wouldn't give a
warning if coverage was 0%

QuickCheck 2.7.3 (released 2014-03-24)
* Add annotations for Safe Haskell.

QuickCheck 2.7.2 (released 2014-03-22)
* Fix bug in cabal file which broke cabal test

QuickCheck 2.7.1 (released 2014-03-20)
* Fixed bug - the Small modifier didn't work on unsigned types
* Changed arbitrarySizedIntegral to have an Integral constraint
instead of just Num

QuickCheck 2.7 (released 2014-03-19)

* New features:
* New genericShrink function provides generic shrinking with GHC.
* New combinator x === y: fails if x /= y, but also prints their values
* New function generate :: Gen a -> IO a for running a generator.
* New combinators infiniteList and infiniteListOf for generating infinite lists.
* Several combinators added to the main Test.QuickCheck module which
were previously languishing in other modules. Of particular interest:
quickCheckAll, ioProperty.
* New combinators delay and capture which can be used (unsafely!)
to reuse the random number seed. Useful for generating
polymorphic (rank-2) values.
* A new Discard data type and a Testable instance for discarding test cases.
* All modifiers now have Functor instances and accessor functions.
* Pressing ctrl-C during shrinking now shows the last failed
test case, rather than the current shrinking candidate.
* Experimental support for UHC. You will need the latest version of Cabal from git.

* Better distribution of test data:
* The Int generator now only generates fairly small numbers.
* The new Small and Large modifiers control the distribution of integers
(Small generates small numbers, Large from the whole range).
* Floating-point numbers shrink better.

* Improved random number generation:
* QuickCheck now uses TFGen rather than StdGen on newer versions
of GHC, because StdGen's random numbers aren't always random.
* 'variant' now uses a prefix code. This should prevent some
potential bananaskins with coarbitrary.

* API changes:
* The Gen monad now uses an abstract type QCGen rather than StdGen.
* The Result type now returns the thrown exception and number
of failed shrink attempts.
* Property is now a newtype rather than Gen Prop as it was before.
* promote is moved into the new module Test.QuickCheck.Gen.Unsafe.
* 'printTestCase' is deprecated - its new name is 'counterexample'
* 'morallyDubiousIOProperty' is deprecated - its new name is
'ioProperty', no moral judgement involved :)

QuickCheck 2.6, released 2013-03-07

* Add convenience Function instances for up to 7-tuples
* Make stderr line buffered to reduce console I/O.
* Return a flag to say whether the test case was interrupted.

QuickCheck 2.5, released 2012-06-18

* Replace maxDiscard with maxDiscardRatio
* Remove Testable () instance.
* Added a 'discard' exception that discards the current test case
* Add accessors for modifiers (where it makes sense)
* Rename 'stop' to 'abort' to avoid a name clash
* Added a 'once' combinator
* If a property is of type Bool, only run it once
* Add coarbitraryEnum to Test.QuickCheck module.
* Add 'coarbitrary' helper for Enums.
* Rejiggled the formatting code to support multi-line error messages
* Add instances for Ordering and Fixed.
* Added arbitraryBoundedEnum generator (thanks to Antoine Latter).
* Add verboseCheckAll and polyverboseCheck function for usability.
Used by 434 packages:
ADPfusion, AERN-Basics, AERN-Real, AERN-Real-Double, AERN-Real-Interval, AERN-RnToRm, ASN1, Agata, AndroidViewHierarchyImporter, BiobaseNewick, BiobaseTypes, BitSyntax, CSPM-FiringRules, CV, ChasingBottoms, ClassLaws, Combinatorrent, ContextAlgebra, Control-Monad-ST2, Craft3e, Crypto, DP, DPutils, DSH, Dflow, Digit, DynamicTimeWarp, EdisonCore, Extra, FComp, Facts, FenwickTree, GLM, GenSmsPdu, Grempa, HCL, HCard, HCodecs, HLearn-classification, HLearn-datastructures, HLearn-distributions, HTF, HaLeX, HaTeX, HaVSA, HaskellTorrent, Hedi, Hs2lib, IOSpec, JYU-Utils, KdTree, LRU, LambdaPrettyQuote, LinearSplit, LinguisticsTypes, ListZipper, MuCheck-QuickCheck, NaturalLanguageAlphabets, NaturalSort, NearContextAlgebra, NonEmptyList, Octree, OpenGLCheck, PandocAgda, PasswordGenerator, PlayingCards, PrimitiveArray, QuickCheck-GenT, QuickCheck-safe, QuickCheckVariant, Ranged-sets, ShellCheck, Stream, TicTacToe, URLT, WaveFront, Wired, accelerate-arithmetic, accelerate-examples, accelerate-fourier, accelerate-typelits, activehs, activehs-base, aeson-schema, aig, alex, alex-meta, alga, alms, anonymous-sums-tests, antimirov, api-tools, arithmetic, aws-elastic-transcoder, aws-general, aws-kinesis, aws-sns, axiomatic-classes, b9, bamse, barecheck, basic-sop, bio, bitcoin-payment-channel, bitx-bitcoin, blas, bytestring-arbitrary, bytestring-typenats, cabal-test, cabal-test-compat, cabal-test-quickcheck, camfort, carray, charade, chatter, checkers, chell-quickcheck, chp-plus, clash-multisignal, clash-prelude, clash-prelude-quickcheck, clif, clifford, clustertools, codec-libevent, cognimeta-utils, collections, collections-api, comfort-graph, compdata, concrete-haskell, constructive-algebra, control-invariants, copilot-c99, craft, crockford, crypto-api-tests, crypto-cipher-tests, crypto-classical, cryptol, cue-sheet, curves, darcs-cabalized, data-clist, data-fin, data-msgpack, dclabel-eci11, deka-tests, dequeue, diff-gestalt, digits, directed-cubical, djembe, doctest-prop, dom-selector, dotfs, dsh-sql, dynamic-object, effective-aspects, effective-aspects-mzv, estimators, event-list, existential, falling-turnip, feldspar-language, fgl-arbitrary, fixhs, flexiwrap, flow2dot, formura, fptest, free-http, funsat, fuzzcheck, generic-random, geniconvert, genvalidity, genvalidity-containers, genvalidity-hspec, genvalidity-hspec-aeson, genvalidity-hspec-cereal, genvalidity-text, geom2d, git-annex, git-repair, gmap, graphicsFormats, graphql-api, hGelf, hPDB, hPDB-examples, hackage-server, hackernews, halfs, harmony, has, hashing, hashtable-benchmark, haskell-kubernetes, haskell-platform-test, haskellscrabble, haskoin-core, haskoin-crypto, haskoin-protocol, haskoin-script, haskoin-util, haslo, hasloGUI, hatt, hbayes, hcube, hdbi-tests, hdis86, hdr-histogram, heapsort, helf, hinquire, hinterface, hjsonpointer, hjsonschema, hmatrix-tests, hmumps, holy-project, homeomorphic, hoogle, hopfield, hopfield-networks, hpio, hspec, hspec-core, hspec-experimental, hspec-golden-aeson, hspec-hashable, hspec-laws, hspec-meta, hspec-test-framework, hspec-wai, hstest, hstox, hstzaar, ideas, ideas-math, inflist, inline-c, introduction-test, iptables-helpers, ireal, ivory-examples, ivory-quickcheck, jalla, jose, json-ast-quickcheck, json-rpc, krapsh, lambdabot-haskell-plugins, lambdabot-trusted, lambdacube-compiler, language-ecmascript, language-nix, leksah, lens-properties, lhc, libGenI, liblawless, linear-algebra-cblas, linear-grammar, linearscan-hoopl, lipsum-gen, logic-TPTP, lol-tests, ltext, luhn, mandrill, megaparsec, meta-par-accelerate, microspec, mida, midi, monad-lgbt, morfette, mtlx, mueval, multivariant, narc, network-bitcoin, newt, nextstep-plist, non-empty, non-negative, numeric-prelude, obj, opentheory, opentheory-bits, opentheory-byte, opentheory-char, opentheory-divides, opentheory-fibonacci, opentheory-parser, opentheory-prime, opentheory-primitive, opentheory-probability, opentheory-stream, opentheory-unicode, orchid, ot, pandoc-types, pathtype, perdure, permutation, pi-forall, point-octree, pointless-lenses, pqc, pred-trie, prednote-test, processing, proctest, proto-lens-arbitrary, pubnub, pure-priority-queue-tests, putlenses, qc-oi-testgenerator, quantum-arrow, quick-generator, quickcheck-arbitrary-adt, quickcheck-assertions, quickcheck-combinators, quickcheck-instances, quickcheck-io, quickcheck-poly, quickcheck-property-comb, quickcheck-property-monad, quickcheck-regex, quickcheck-relaxng, quickcheck-rematch, quickcheck-report, quickcheck-script, quickcheck-simple, quickcheck-special, quickcheck-string-random, quickcheck-text, quickcheck-unicode, quickcheck-webdriver, quickcheck-with-counterexamples, quickpull, quickspec, rainbow-tests, rclient, reaction-logic, reactive, reduce-equations, refcount, regular-extras, repa, repa-examples, riscv-isa, rivers, rncryptor, rose-trees, runtime-arbitrary, saltine-quickcheck, sample-frame, sbv, sdl2-compositor, secp256k1, semiring, seqloc-datafiles, serokell-util, servant-aeson-specs, servant-mock, servant-quickcheck, servant-swagger, sets, sexpr, shaker, simple-rope, simple-vec3, simplex-basic, slug, smartcheck, smtlib2-quickcheck, snap-testing, soyuz, sr-extra, storablevector, strict-base-types, subhask, sunroof-examples, synthesizer, synthesizer-core, t-regex, tableaux, tai64, takusen-oracle, target, tasty-hspec, tasty-quickcheck, tdd-util, test-framework-quickcheck, test-framework-quickcheck2, test-invariant, test-sandbox-quickcheck, test-simple, testing-feat, testpack, testrunner, text-generic-pretty, th-instances, these, thrift, thyme, time-warp, tip-haskell-frontend, toktok, toolshed, torch, toxcore, transformations, treeviz, tries, twill, type-sub-th, typelevel-tensor, typerbole, unfoldable, vaultaire-common, vty-examples, vty-ui, webapi, x86-64bit, xml-isogen, xml-tydom-core, xsha1, zoom-cache
comments powered byDisqus