The HTF package

[Tags: lgpl, library, program]

The Haskell Test Framework (HTF for short) lets you define unit tests (, QuickCheck properties (, and black box tests in an easy and convenient way. HTF uses a custom preprocessor that collects test definitions automatically. Furthermore, the preprocessor allows HTF to report failing test cases with exact file name and line number information. Additionally, HTF tries to produce highly readable output for failing tests: for example, it colors and pretty prints expected and actual results and provides a diff between the two values.

The documentation of the Test.Framework.Tutorial module provides a tutorial for HTF. There is also a slightly out-dated blog article ( demonstrating HTF's coloring, pretty-printing and diff functionality.

HEADS UP, backwards incomatibility with prior versions:

In version, the following changes could break code compiled against version 0.9.*:

Starting with version, HTF uses a new strategy for collecting the testcases defined in your project (see Test.Framework.Tutorial for a description of this strategy). If you used version 0.8.* or earlier of HTF, this will break your build! However, it's rather easy to bring you project in line with the new HTF version. Here are the steps that will most likely resolve your backwards incompatibility problems:


Versions0.1, 0.3, 0.3.1, 0.3.2, 0.3.3, 0.3.4,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 0.11.2,,,,,,,,,,,,,,
Change logChangeLog
Dependenciesaeson (>=0.6), array, base (==4.*), bytestring (>=0.9), containers (>=, cpphs (>=1.12), Diff (>=0.3), directory (>=1.0), haskell-src-exts (>=1.14), HUnit (>=1.2.5), lifted-base (>=0.1), monad-control (>=0.3), mtl (>=1.1), old-time (>=1.0), pretty (>=1.0), process (>=1.0), QuickCheck (>=2.3), random (>=1.0), regex-compat (>=0.92), text (>=0.11), unix (>=2.4), xmlgen (>=0.6)
Copyright(c) 2005-2012 Stefan Wehr
AuthorStefan Wehr <>
MaintainerStefan Wehr <>
Home page
Bug tracker
Source repositoryhead: git clone
UploadedTue Apr 8 14:25:22 UTC 2014 by StefanWehr
DistributionsLTSHaskell:, NixOS:, Stackage:
Downloads14184 total (745 in last 30 days)
StatusDocs available [build log]
Successful builds reported [all 1 reports]




Maintainers' corner

For package maintainers and hackage trustees