The quickspec package

[Tags:bsd3, library]

QuickSpec automatically finds equational properties of your program.

Give it an API, i.e. a collection of functions, and it will spit out equations about those functions. For example, given reverse, ++ and [], QuickSpec finds six laws:

xs++[] == xs
[]++xs == xs
reverse [] == []
(xs++ys)++zs == xs++(ys++zs)
reverse (reverse xs) == xs
reverse xs++reverse ys == reverse (ys++xs)

All you have to provide is:

Consider this a pre-release. Everything is complete but undocumented :) The best place to start is the examples at There is also a paper at Everything you need should be in the module Test.QuickSpec.

If you want help, email me!

[Skip to Readme]


Versions 0.9, 0.9.1, 0.9.2, 0.9.3, 0.9.4, 0.9.5, 0.9.6
Dependencies array, base (<5), containers, ghc-prim, mtl, QuickCheck, random, spoon (>=0.2), transformers [details]
License BSD3
Copyright 2009-2013 Nick Smallbone
Author Nick Smallbone
Category Testing
Home page
Source repository head: git clone git:// -b master
Uploaded Wed Mar 13 16:00:24 UTC 2013 by NickSmallbone
Distributions NixOS:0.9.6
Downloads 1764 total (28 in the last 30 days)
0 []
Status Docs not available [build log]
Successful builds reported [all 7 reports]
Hackage Matrix CI


  • Test
    • Test.QuickSpec
      • Test.QuickSpec.Approximate
      • Test.QuickSpec.Equation
      • Test.QuickSpec.Generate
      • Test.QuickSpec.Main
      • Test.QuickSpec.Prelude
      • Reasoning
        • Test.QuickSpec.Reasoning.CongruenceClosure
        • Test.QuickSpec.Reasoning.NaiveEquationalReasoning
        • Test.QuickSpec.Reasoning.PartialEquationalReasoning
        • Test.QuickSpec.Reasoning.UnionFind
      • Test.QuickSpec.Signature
      • Test.QuickSpec.Term
      • Test.QuickSpec.TestTotality
      • Test.QuickSpec.TestTree
      • Test.QuickSpec.Utils
        • Test.QuickSpec.Utils.TypeMap
        • Test.QuickSpec.Utils.TypeRel
        • Test.QuickSpec.Utils.Typeable
        • Test.QuickSpec.Utils.Typed


Maintainer's Corner

For package maintainers and hackage trustees

Readme for quickspec

Readme for quickspec-0.9.1

cabal install and look at the examples directory.