hope - a lazy interpreter for the functional language Hope
] [ -f file
] [ -t nsecs
is an interactive interpreter for a lazy variant of the functional
language Hope. It is most commonly run without options or arguments, and reads
commands from the standard input, and prints results on the standard output.
If the standard input is a terminal, hope
prompts with the string
'. A simple use is to enter an expression, terminated by a
semicolon. The interpreter will respond by printing the value and type of the
expression, < preceded by `>>
'. For example,
>> 42 : num
See the documentation for more complicated uses.
These options are mainly useful for non-interactive use of the interpreter.
- Generate a listing of the input, with embedded error messages.
- The interpreter is run in restricted mode: all file I/O is disabled
(except for reading of libraries).
- -f file
- Read input from file instead of the standard input. This is useful
for Hope scripts, whose first line would be
"#! /usr/local/bin/hope -f arg ...
Any additional arguments will be available through the variable
- -t n
- Evaluation of any expression is interrupted if it takes more than n
- The standard library directory.
- A colon-separated list of directories to search for Hope modules in
uses commands. An empty entry refers to the standard library
directory. The default value is `.:'.
A Hope module name
is stored in a file ` name.hop
- A Hope Interpreter - Reference, Ross Paterson.
- A Hope Tutorial, Roger Bailey.
Both documents should be distributed with this program.
Ross Paterson <firstname.lastname@example.org>