convert a custom test-suite to Cabal-test

Thomas Tuegel ttuegel at
Sun Mar 13 16:31:38 CET 2011

On Sun, Mar 13, 2011 at 8:29 AM, Henning Thielemann
<lemming at> wrote:
> Currently I am trying to convert the test suite in utility-ht to Cabal's new
> Testing feature. The documentation in
>  mentions the packages cabal-test-hunit, cabal-test-quickcheck1, and
> cabal-test-quickcheck2 but I cannot find them on Hackage.

The detailed test suite type is disabled in every released version of
Cabal because we've been planning major changes to it for some time.
Because of this, these packages were never released.

> Will I be able to write a test-suite that works both with QuickCheck-1 and
> QuickCheck-2? So far I was able to write my Arbitrary instances and tests in
> a way that they can be run from both QuickCheck-1 and QuickCheck-2. Thus a
> single package cabal-test-quickcheck that provides a consistent interface to
> both QuickCheck versions would help me.

The hope is that once the library interface is finished, the
QuickCheck author(s) would choose to support it directly. Then, you
wouldn't need cabal-test-quickcheck{1,2} and you could write test
suites that work with either version.

> I am unhappy about the naming PureTestable vs. ImpureTestable. As part of a
> fundamental package like Cabal it further fixes the ubiquitous confusion
> about purity in Haskell. I propose to rename as follows:

I am also unhappy with the interface (and I wrote it!). We have known
for a long time that we were going to change this, which is why it was
never enabled in a released version of Cabal. I recently submitted a
patch which greatly improves the detailed interface; this is one issue
in particular that it addresses. That patch is not yet in the darcs
repository for Cabal, but if you're going to develop a test suite for
the detailed interface, I would recommend that you wait until it is,
rather than develop against an obsolete interface. If you want to
target released versions of Cabal, you could instead develop your test
suite against the exitcode-stdio interface, which is available now.

Thanks for your interest!

Thomas Tuegel

More information about the cabal-devel mailing list