Clone wiki

hstest / FAQ


If your question is not in this list, please e-mail me at

hstest crashes when I try to check QuickCheck properties, how do I get it to work? My HUnit tests run fine

Version 0.0.2 of hstest only supports version 1 of QuickCheck, and your GHC install is using version 2 of QuickCheck by default.

To check this, run

$ ghc-pkg list QuickCheck

This will show you which version(s) of QuickCheck you have installed. For example, on my laptop this produces


To prevent hstest from trying to use the later version, you use the --hide-package switch, e.g.

$ hstest --hide-package QuickCheck-

The earlier version of QuickCheck may be hidden by default (in which case it will appear in brackets or a different colour in ghc-pkg's output). If so, you use the --expose-package switch to unhide it, e.g.

$ hstest --hide-package QuickCheck- --expose-package QuickCheck-

If you do not have a version 1 of QuickCheck installed, I think you install it with

$ cabal install QuickCheck-

Support for QuickCheck 2 is on my hstest todo list. Ideally hstest should just use and work with whichever version of QuickCheck it's given, but I haven't written enough code to make that happen yet.