Hi Geraint,
> I hope that I have correctly checked that this is a problem with
> the hugs distribution we have, rather than with the way that the
> support staff here installed it. (And I hope I have not just made
> a fool of myself too...)
No, it looks like the problem is with us.
> It appears that - contrary to the specification in the manual page -
> the binary of the hugs interpreter does not use the HUGSEDIT
> environment variable.
I'm afraid we've not been updating the manual page recently so it's
gotten rather out of date.
I've just updated the man page and am
including the formatted text, the nroff source code and the diffs for the
master file (so that you can easily see what's changed).
Sorry for the confusion.
Alastair
.TH HUGS 1 "June 1998" "" ""
.\" ***Local system maintainers should correct the following string defs ***
." location of Hugs files - site specific
.ds LB /usr/local/share/hugs
.ds BN /usr/local/bin
.ds DC /usr/local/docs
.ds VI vi
.SH NAME
hugs \- Hugs 1.4, 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 1.4 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 \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 modules
\fB\&.\fP Print dots to show progress
\fBq\fP Print nothing to show progress
\fBw\fP Always show which modules loaded
\fBk\fP Show kind errors in full
\fBu\fP Use "show" to display results
\fBi\fP Chase imports while loading modules
.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
\fBF\fIstr\fR Set preprocessor filter to str
.fi
.LP
The default settings are:
\fB+fewui -stgl.qk -h100000 -p"%s> " -r$$
-P{Hugs}/lib:{Hugs}/lib/hugs:{Hugs}/lib/exts\fP
.SH ENVIRONMENT
The following environment variables may be set in the
user's \fI.login\fP or \fI.profile\fP file:
.TP 16
.BI HUGSFLAGS= flags
A list of flags in the same format as for the \fB:set\fP command.
.TP 16
.BI EDITOR= editor
Used if an editor has not been specified using \fBHUGFLAGS\fP or by the \fB:set\fP
command.
.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 at haskell.org:
.br
\fIhttp://haskell.org/hugs/\fP.
.PP
The Haskell report home page:
.br
\fIhttp://haskell.org/haskell-report/haskell-report.html\fP.
.PP
.SH "SEE ALSO"
Mark P. Jones. \fIHugs 1.4, The Haskell User's Gofer System: User Manual\fP,
August 1996.
.PP
J. Peterson and K. Hammond (editors). \fIReport on the Programming Language
Haskell 1.4, A Non-strict Purely Functional Language\fP.
Yale University, Department of Computer Science,
Research Report YALEU/DCS/RR-1106, March 1997.
.PP
Paul Hudak & Joseph H. Fasel. A gentle introduction to Haskell.
\fIACM SIGPLAN Notices\fP, 27(5), May 1992.
.PP
.SH AUTHOR
Hugs 1.4, Mark Jones, University of Nottingham, August 1996.
.br
Manual page: Jonathan Bowen, modified by Gary Leavens, and then
(with apologies to the original authors) by Mark Jones.
Index: hugs.1
===================================================================
RCS file: /net/haskell/homes/systems/hcompile/CVS/hugs/docs/hugs.1,v
retrieving revision 1.3
diff -c -C2 -r1.3 hugs.1
*** hugs.1 1997/09/05 22:04:09 1.3
--- hugs.1 1998/06/26 17:19:38
***************
*** 1,8 ****
! .TH HUGS 1 "August 1996" "" ""
.\" ***Local system maintainers should correct the following string defs ***
." location of Hugs files - site specific
! .ds LB /usr/local/Hugs
! .ds BN /usr/local/Hugs/bin
! .ds DC /usr/local/Hugs/docs
.ds VI vi
.SH NAME
--- 1,8 ----
! .TH HUGS 1 "June 1998" "" ""
.\" ***Local system maintainers should correct the following string defs ***
." location of Hugs files - site specific
! .ds LB /usr/local/share/hugs
! .ds BN /usr/local/bin
! .ds DC /usr/local/docs
.ds VI vi
.SH NAME
***************
*** 31,34 ****
--- 31,35 ----
\fB:edit \fI<filename>\fR edit file
\fB:edit\fP edit last file
+ \fB:module \fI<module>\fR set module for evaluating expressions
\fI<expr>\fP evaluate expression
\fB:type \fI<expr>\fR print type of expression
***************
*** 67,80 ****
.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
! \fBw\fP Always show which files loaded
\fBk\fP Show kind errors in full
\fBu\fP Use "show" to display results
! \fBi\fP Chase imports while loading files
.fi
.LP
--- 68,82 ----
.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 modules
\fB\&.\fP Print dots to show progress
! \fBq\fP Print nothing to show progress
! \fBw\fP Always show which modules loaded
\fBk\fP Show kind errors in full
\fBu\fP Use "show" to display results
! \fBi\fP Chase imports while loading modules
.fi
.LP
***************
*** 89,112 ****
\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.k -h100K -p"? " -r$$\fP
.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/libhugs\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
--- 91,108 ----
\fBP\fIstr\fR Set search path for script files to \fIstr\fP
\fBE\fIstr\fR Use editor setting given by \fIstr\fP
+ \fBF\fIstr\fR Set preprocessor filter to str
.fi
.LP
The default settings are:
! \fB+fewui -stgl.qk -h100000 -p"%s> " -r$$
-P{Hugs}/lib:{Hugs}/lib/hugs:{Hugs}/lib/exts\fP
.SH ENVIRONMENT
The following environment variables may be set in the
user's \fI.login\fP or \fI.profile\fP file:
.TP 16
! .BI HUGSFLAGS= flags
! A list of flags in the same format as for the \fB:set\fP command.
.TP 16
.BI EDITOR= editor
! Used if an editor has not been specified using \fBHUGFLAGS\fP or by the \fB:set\fP
command.
.TP 16
.BI SHELL= cmd
***************
*** 126,140 ****
.SH "WEB REFERENCES"
! The Hugs home page at Nottingham:
! .br
! \fIhttp://www.cs.nott.ac.uk/Department/Staff/mpj/hugs.html\fP.
! .PP
! The Hugs home page at Yale:
.br
! \fIhttp://haskell.cs.yale.edu/hugs/\fP.
.PP
The Haskell report home page:
.br
! \fIhttp://haskell.cs.yale.edu/haskell-report/haskell-report.html\fP.
.PP
--- 122,132 ----
.SH "WEB REFERENCES"
! The Hugs home page at haskell.org:
.br
! \fIhttp://haskell.org/hugs/\fP.
.PP
The Haskell report home page:
.br
! \fIhttp://haskell.org/haskell-report/haskell-report.html\fP.
.PP
Index: Makefile
===================================================================
RCS file: /net/haskell/homes/systems/hcompile/CVS/hugs/docs/Makefile,v
retrieving revision 1.1
diff -c -C2 -r1.1 Makefile
*** Makefile 1997/04/09 22:48:51 1.1
--- Makefile 1998/06/26 17:19:38
***************
*** 10,12 ****
--- 10,15 ----
latex server.tex
+ hugs.man : hugs.1
+ nroff -man hugs.1 > hugs.man
+
# End of Makefile
hugs.man