Hi,

As part of my work to maintain the Debian package for Hugs, I updated
the hugs(1) manual page to Hugs 98.  I'm attaching the final version
(the diff would not be much smaller).  You might want to use this (or
a modified) version in your next release of Hugs 98.

-- 
%%% Antti-Juhani Kaijanaho % [EMAIL PROTECTED] % http://www.iki.fi/gaia/ %%%

                                  ""
                             (John Cage)
.TH HUGS 1 "August 1999" "" ""
.\" ***Local system maintainers should correct the following string defs ***
." location of Hugs files - site specific
.ds LB /usr/share/hugs98
.ds BN /usr/bin
.ds DC /usr/doc/hugs
.ds VI vi
.SH NAME
hugs \- Hugs 98, functional programming system
.SH SYNOPSIS
.B hugs
[ \fIoptions\fP ]
.SH DESCRIPTION
Hugs is an interpreter for Haskell, a standard non-strict functional
programming language.  Hugs implements almost all of version 98 of the
Haskell standard, except for the module system.  The name \fBHugs\fP is
a mnemonic for the \fBHaskell User's Gofer System\fP.
.PP
The interpreter is started using the
.I hugs
command.  Once the interpreter has been loaded, typing \fB:?\fP will
print the following list of commands:
.IP
.nf
.ta 2i
\fB:load \fI<filenames>\fR      load scripts from specified files
\fB:load\fP     clear all files except prelude
\fB:also \fI<filenames>\fR      read additional script files
\fB:reload\fP   repeat last load command
\fB:project \fI<filename>\fR    use project file
\fB:edit \fI<filename>\fR       edit file
\fB:edit\fP     edit last file
\fB:module\fP \fI<module>\fR    set module for evaluating expressions
\fI<expr>\fP    evaluate expression
\fB:type \fI<expr>\fR   print type of expression
\fB:?\fP        display this list of commands
\fB:set \fI<options>\fR set command line options
\fB:set\fP      help on command line options
\fB:names \fI[pat]\fR   list names currently in scope
\fB:info \fI<names>\fR  describe named objects
\fB:find \fI<name>\fR   edit file containing definition of name
\fB:!\fIcommand\fR      shell escape
\fB:cd \fIdir\fR        change directory
\fB:gc\fP       force garbage collection
\fB:quit\fP     exit Hugs interpreter
.fi
.PP
Any command may be abbreviated to \fB:\fIc\fR where
\fIc\fP is the first character in the full name.
On most systems, you can also
exit from Hugs by typing the end-of-file character (^D).
.PP
Note that the interrupt key (^C on most systems) can  be  used  at  any
time whilst using Hugs to abandon the process of reading in a file  of
function definitions or the evaluation  of  an  expression.   When  the
interrupt key is detected, Hugs prints the string "{Interrupted!}" and
prints the "? " prompt so that further commands can be entered.

.SH OPTIONS
Help with command line options can be obtained by
typing \fB:set\fP followed by the return key within the
interpreter.
.LP
Many options are toggled with \fB+\fP or \fB\-\fP to turn them on or
off, respectively. The following options are available:
.IP
.nf
.ta 0.75i
\fBs\fP Print number of reductions/cells after eval
.\" \fBt\fP     Print type after evaluation
\fBf\fP Terminate evaluation on first error
\fBg\fP Print number of cells recovered after gc
\fBl\fP Literate scripts as default
\fBe\fP Warn about errors in literate scripts
\fB\&.\fP       Print dots to show progress
\fBq\fP Print nothing to show progress
\fBw\fP Always show which files loaded
\fBk\fP Show kind errors in full
\fBo\fP Allow overlapping instances
\fBu\fP Use "show" to display results
\fBi\fP Chase imports while loading files
.fi
.LP
Other options (which should also be preceded by \fB+\fP or \fB\-\fP,
the choice making no difference) are:
.IP
.nf
.ta 0.75i
\fBh\fInum\fR   Set heap size (cannot be changed within \fIHugs\fP)
\fBp\fIstr\fR   Set prompt string to \fIstr\fP
\fBr\fIstr\fR   Set repeat last expression string to \fIstr\fP
\fBP\fIstr\fR   Set search path for script files to \fIstr\fP
\fBE\fIstr\fR   Use editor setting given by \fIstr\fP
.fi
.LP
The default settings are:
\fB+fewui -stgl.ko -h100K -p"? " -r$$\fP
.LP
There is a special kind of an option, which can be set on the command
line only.  It is \fB98\fP (preceded by a minus or a plus), defining
whether the interpreter should be in the Haskell 98 mode (with plus)
or in the Hugs mode (with minus).  The former is default, as that
allows novices to use a standard evironment.  The latter turns on many
extensions to the language.
.SH ENVIRONMENT
The following environment variables may be set in the
user's \fI.login\fP or \fI.profile\fP file:
.TP 16
.BI HUGSPATH= file
A colon-separated list of directories to be searched for script
files, including the standard prelude.
The standard setting is \fI\*(LB/lib:\*(LB/lib/hugs:\*(LB/lib/exts\fP.
.TP 16
.BI HUGSEDIT= cmd
Set the editor command line to be used by \fIhugs\fP.  A common
setting is
\fI"\*(VI +%d %s"\fP.
.TP 16
.BI EDITOR= editor
Used in place of \fBHUGSEDIT\fP if the latter is not set.
.TP 16
.BI SHELL= cmd
Used to specify shell that is invoked by the \fB:!\fP command.
.SH FILES
.PD 0
.TP 30
\*(BN/hugs
executable binary
.TP 30
\*(LB
support files
.TP 30
\*(LB/Prelude.hs
standard \fIhugs\fP prelude
.PD

.SH "WEB REFERENCES"
The Hugs home page:
.br
\fIhttp://www.haskell.org/hugs/\fP
.PP

.SH "SEE ALSO"
Mark P. Jones et al. \fIHugs 98 User Manual\fP, June 1999.
.PP
S. Peyton Jones and J. Hughes (editors). \fIReport on the Programming
Language Haskell 98, A Non-strict Purely Functional Language\fP, February
1999.
.PP
Paul Hudak & Joseph H. Fasel.  A gentle introduction to Haskell.
\fIACM SIGPLAN Notices\fP, 27(5), May 1992.
.PP

.SH AUTHOR
Hugs 98, Mark Jones and others, June 1999.
.br
Manual page: Jonathan Bowen, modified by Gary Leavens, and then
(with apologies to the original authors) by Mark Jones; updated
for Hugs 98 by Antti-Juhani Kaijanaho.






Reply via email to