HPG(1)

NAME
hpg - generate random Haskell programs to test compilers

SYNOPSIS
hpg [ -s seeds ] [ -nt types ] [ -dt type_depth ] [ -nv values ] [ -dv val_depth ] [ -de exp_depth ] [ -m mod_name ] [ -o file ]

DESCRIPTION
hpg generates self-checking random test Haskell programs. These are designed to test the code generation part of a compiler; when executed they should print a list of Trues. An hpg program consists of a sequence of algebraic type declarations, a sequence of value declarations and then a main function which checks that the declared values are equal to specially generated expressions.

ARGUMENTS

-s seeds
    Provides seeds for the internal random number generator. seeds should be of the form '(n1,n2,n3)' where n1, n2, and n3 are integers, and the quotes protect the parentheses from shell interpretation.

-nt types
    The number of algebraic type declarations to be generated.

-dt type_depth
    An integer giving a measure of the complexity of the generated types.

-nv values
    The number of value declarations to be generated.

-dv val_depth
    An integer giving a measure of the complexity of the generated values.

-de exp_depth
    An integer giving a measure of the complexity of the generated expressions.

-m mod_name
    Name of the module to which the output module will be written.

-o file
    Name of a file to which the output program will be written. In the absence of this flag, the program is written to the standard output.

-?  any flag value not in the above list causes hpg to generate a message giving the default values of all flags.

NOTES
hpg is under continuous development and, I hope, improvement. Comments, suggestions and bug reports are always welcome - please send them to the email address at the end of this manual page.

SEE ALSO
The Haskell Program Generator. Commented source code for hpg.

AUTHOR
hpg was written by Nick North, of the National Physical Laboratory, UK. Email address: ndn@seg.npl.co.uk.