pure (1) - Linux Manuals

pure: the Pure interpreter

NAME

pure - the Pure interpreter

SYNOPSIS

pure [options ...] [script ...] [-- args ...]
pure [options ...] -x script [args ...]

OPTIONS

-c
Batch compilation.
--ctags, --etags
Create a tags file in ctags (vi) or etags (emacs) format.
--eager-jit
Enable eager JIT compilation. This requires LLVM 2.7 or later, otherwise this flag will be ignored.
-fPIC, -fpic
Create position-independent code (batch compilation).
-g
Enable symbolic debugging.
--help, -h
Print help message and exit.
-i
Force interactive mode (read commands from stdin).
-Idirectory
Add a directory to be searched for included source scripts.
-Ldirectory
Add a directory to be searched for dynamic libraries.
-llibname
Library to be linked in batch compilation.
--noediting
Disable command-line editing.
--noprelude, -n
Do not load the prelude.
--norc
Do not run the interactive startup files.
-ofilename
Output filename for batch compilation.
-q
Quiet startup (suppresses sign-on message in interactive mode).
-Tfilename
Tags file to be written by --ctags or --etags.
-u
Do not strip unused functions in batch compilation.
-v[level]
Set verbosity level.
--version
Print version information and exit.
-w
Enable compiler warnings about various dubious constructs and backward compatibility issues.
-x
Execute script with given command line arguments.
--
Stop option processing and pass the remaining command line arguments in the argv variable.

DESCRIPTION

Pure is a modern-style functional programming language based on term rewriting. Pure programs are basically collections of equational rules used to evaluate expressions in a symbolic fashion by reducing them to normal form.

pure is the Pure interpreter. The interpreter has an LLVM backend which JIT-compiles Pure programs to machine code, hence programs run blazingly fast and interfacing to C modules is easy, while the interpreter still provides a convenient, fully interactive environment for running Pure scripts and evaluating expressions.

Basically, to run a Pure script with the interpreter, just specifiy the filename of the script on the command line. You can also invoke the interpreter without arguments, in which case it starts up in interactive mode. Or you can compile a script to a native executable (as well as a number of other recognized LLVM and native code formats) with the -c option (use -o to specify the output filename); this requires that you have some parts of the LLVM toolchain (llc, opt) as well as gcc installed. Last but not least, you can create a tags file for use with emacs(1) or vi(1) with the --etags and --ctags options.

The full version of this manual can be read inside the interpreter, by typing help on the interpreter's command line. This requires w3m(1) to work. (You can also set the name of another html browser to use with the PURE_HELP or the BROWSER environment variable.)

FILES

a.out
Default output filename for batch compilation (-c).
~/.pure_history
Interactive command history.
~/.purerc, .purerc, .pure
Interactive startup files. The latter is usually a dump from a previous interactive session.
prelude.pure
Standard prelude. If available, this script is loaded before any other definitions, unless -n was specified.

ENVIRONMENT

BROWSER
If the PURE_HELP variable is not set (see below), this specifies a colon-separated list of browsers to try for reading the online documentation. See http://www.catb.org/~esr/BROWSER/.
PURELIB
Directory to search for library scripts, including the prelude. If PURELIB is not set, it defaults to some location specified at installation time.
PURE_EAGER_JIT
Enable eager JIT compilation (same as --eager-jit).
PURE_HELP
Browser to use to read online documentation in the interpreter. By default, w3m(1) is used.
PURE_INCLUDE
Additional directories (in colon-separated format) to be searched for included scripts.
PURE_LIBRARY
Additional directories (in colon-separated format) to be searched for dynamic libraries.
PURE_MORE
Shell command to be used for paging through output of the show command, when the interpreter runs in interactive mode.
PURE_PS
Command prompt used in the interactive command loop ("> " by default).
PURE_STACK
Maximum stack size in kilobytes (default: 0 = unlimited).

LICENSE

LGPL V3 or later. See the accompanying COPYING file for details.

AUTHOR

Albert Graef <Dr.Graef [at] t-online.de>, Dept. of Computer Music, Johannes Gutenberg University of Mainz, Germany.

SEE ALSO

You can find the latest releases and the mailing list at the Pure website, http://pure-lang.googlecode.com.