User Tools

Site Tools


QuickCheck Script

I like QuickCheck when developing Haskell code. GHC comes bundled with the QuickCheck library. However, it misses a tool for batch processing. The attached shell script find all properties in a set of modules and verify them all.

Download quickcheck.gz, decompress it in a folder on your path and make it executable.

This script scans the files given on command line for QuickCheck properties. The convention used is that properties always begin in the first column and are prefixed with prop_. The script then creates a new Haskell source file to run the tests and executes it.


Enter your comment. Wiki syntax is allowed:
blog/2008/05/06/quickcheck_script.txt · Last modified: 2011/02/20 20:28 (external edit)