DrIFT(1)

DrIFT1

A type sensitive preprocessor for haskell

Usage

DrIFT [options ...] file ...

Overview

It extracts type declarations and directives from modules. The directives cause rules to be fired on the parsed type declarations, generating new code which is then appended to the bottom of the input file. The rules are expressed as Haskell code, and it is intended that the user can add new rules as required.

DrIFT automates instance derivation for classes that aren't supported by the standard compilers. In addition, instances can be produced in separate modules to that containing the type declaration. This allows instances to be derived for a type after the original module has been compiled. As a bonus, simple utility functions can also be produced from a type.

-v, --verbose

chatty output on stderr

-V, --version

show version number

-l, --list

list available derivations

-L, --noline

omit line pragmas from output

-o FILE, --output=FILE

output FILE

-s name:value, --set=name:value

set argument to value

-r, --results-only

output only results, do not include source file

-g rule, --global=rule

addition rules to apply globally

-i, --ignore

ignore directives in file, which is useful with -g

Environment

The environment variable DERIVEPATH can be used to declare a list of directories which contain the modules and/or interfaces that define the additional classes you wish to derive from. DrIFT is quite fussy about the format of the DERIVEPATH variable. The directory list should have the following format:

* each path should be separated by ‘:’
* no space inserted anywhere
* no final ‘/’ on the end of a path

Examples of DERIVEPATH settings:
good - /users/grad/nww/share/hugs/lib:/users/grad/nww/share/hugs/lib/hugs
bad - /users/grad/nww/share/hugs/lib/:/users/grad/nww/share/hugs/lib/hugs/

Releases

Unchanged in 3 releases since Debian 4.0 (Etch).

  1. 4.0–6.0

Author

This manual page was written by Arjan Oosting <[email protected]> for the Debian system (but may be used by others).

From drift 2.2.3-2+b1 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.