RProcess.SISSTDLIB.SIShugs.hlp!:\System\Apps\Hugs\Hugs.hlphugs.app!:\System\Apps\Hugs\Hugs.apphugs.aif!:\System\Apps\Hugs\Hugs.aifbitmaps.mbm!:\System\Apps\Hugs\bitmaps.mbm..\..\..\demos\prolog\stdlib!:\System\Apps\Hugs\Demos\prolog\stdlib..\..\..\demos\prolog\readme!:\System\Apps\Hugs\Demos\prolog\readme..\..\..\demos\prolog\Subst.hs!:\System\Apps\Hugs\Demos\prolog\Subst.hs..\..\..\demos\prolog\StackEngine.hs!:\System\Apps\Hugs\Demos\prolog\StackEngine.hs..\..\..\demos\prolog\PureEngine.hs!:\System\Apps\Hugs\Demos\prolog\PureEngine.hs..\..\..\demos\prolog\Prolog.hs!:\System\Apps\Hugs\Demos\prolog\Prolog.hs..\..\..\demos\prolog\Main.hs!:\System\Apps\Hugs\Demos\prolog\Main.hs..\..\..\demos\prolog\CombParse.hs!:\System\Apps\Hugs\Demos\prolog\CombParse.hs..\..\..\demos\prolog\AndorraEngine.hs!:\System\Apps\Hugs\Demos\prolog\AndorraEngine.hs..\..\..\demos\Tree.hs!:\System\Apps\Hugs\Demos\Tree.hs..\..\..\demos\Stack.hs!:\System\Apps\Hugs\Demos\Stack.hs..\..\..\demos\Say.hs!:\System\Apps\Hugs\Demos\Say.hs..\..\..\demos\Queens.hs!:\System\Apps\Hugs\Demos\Queens.hs..\..\..\demos\Minsrand.hs!:\System\Apps\Hugs\Demos\Minsrand.hs..\..\..\demos\Mersenne.hs!:\System\Apps\Hugs\Demos\Mersenne.hs..\..\..\demos\Matrix.hs!:\System\Apps\Hugs\Demos\Matrix.hs..\..\..\demos\Literate.lhs!:\System\Apps\Hugs\Demos\Literate.lhs..\..\..\demos\Ldfs.hs!:\System\Apps\Hugs\Demos\Ldfs.hs..\..\..\demos\Lattice.hs!:\System\Apps\Hugs\Demos\Lattice.hs..\..\..\demos\Gofer.hs!:\System\Apps\Hugs\Demos\Gofer.hs..\..\..\demos\FastSort.hs!:\System\Apps\Hugs\Demos\FastSort.hs..\..\..\demos\Expr.hs!:\System\Apps\Hugs\Demos\Expr.hs..\..\..\demos\Examples.hs!:\System\Apps\Hugs\Demos\Examples.hs..\..\..\demos\EvalRed.hs!:\System\Apps\Hugs\Demos\EvalRed.hs..\..\..\demos\Eliza.hs!:\System\Apps\Hugs\Demos\Eliza.hs..\..\..\demos\Demos.hs!:\System\Apps\Hugs\Demos\Demos.hs..\..\..\demos\CommaInt.lhs!:\System\Apps\Hugs\Demos\CommaInt.lhs..\..\..\demos\Calendar.hs!:\System\Apps\Hugs\Demos\Calendar.hs..\..\..\demos\ArrayEx.hs!:\System\Apps\Hugs\Demos\ArrayEx.hs..\..\..\demos\AnsiDemo.hs!:\System\Apps\Hugs\Demos\AnsiDemo.hs..\..\..\lib\hugs\Trex.hs!:\System\Apps\Hugs\Lib\hugs\Trex.hs..\..\..\lib\hugs\Trace.hs!:\System\Apps\Hugs\Lib\hugs\Trace.hs..\..\..\lib\hugs\StdLibs.hs!:\System\Apps\Hugs\Lib\hugs\StdLibs.hs..\..\..\lib\hugs\Sequence.hs!:\System\Apps\Hugs\Lib\hugs\Sequence.hs..\..\..\lib\hugs\ParseLib.hs!:\System\Apps\Hugs\Lib\hugs\ParseLib.hs..\..\..\lib\hugs\OldWeak.hs!:\System\Apps\Hugs\Lib\hugs\OldWeak.hs..\..\..\lib\hugs\Number.hs!:\System\Apps\Hugs\Lib\hugs\Number.hs..\..\..\lib\hugs\ListUtils.hs!:\System\Apps\Hugs\Lib\hugs\ListUtils.hs..\..\..\lib\hugs\IOExtensions.hs!:\System\Apps\Hugs\Lib\hugs\IOExtensions.hs..\..\..\lib\hugs\Interact.hs!:\System\Apps\Hugs\Lib\hugs\Interact.hs..\..\..\lib\hugs\HugsLibs.hs!:\System\Apps\Hugs\Lib\hugs\HugsLibs.hs..\..\..\lib\hugs\HugsInternals.hs!:\System\Apps\Hugs\Lib\hugs\HugsInternals.hs..\..\..\lib\hugs\HugsDynamic.hs!:\System\Apps\Hugs\Lib\hugs\HugsDynamic.hs..\..\..\lib\hugs\GenericPrint.hs!:\System\Apps\Hugs\Lib\hugs\GenericPrint.hs..\..\..\lib\hugs\CVHAssert.hs!:\System\Apps\Hugs\Lib\hugs\CVHAssert.hs..\..\..\lib\hugs\AnsiScreen.hs!:\System\Apps\Hugs\Lib\hugs\AnsiScreen.hs..\..\..\lib\hugs\AnsiInteract.hs!:\System\Apps\Hugs\Lib\hugs\AnsiInteract.hs..\..\..\lib\exts\Word.hs!:\System\Apps\Hugs\Lib\exts\Word.hs..\..\..\lib\exts\Weak.hs!:\System\Apps\Hugs\Lib\exts\Weak.hs..\..\..\lib\exts\Stable.hs!:\System\Apps\Hugs\Lib\exts\Stable.hs..\..\..\lib\exts\ST.hs!:\System\Apps\Hugs\Lib\exts\ST.hs..\..\..\lib\exts\Semaphore.lhs!:\System\Apps\Hugs\Lib\exts\Semaphore.lhs..\..\..\lib\exts\SampleVar.lhs!:\System\Apps\Hugs\Lib\exts\SampleVar.lhs..\..\..\lib\exts\Pretty.lhs!:\System\Apps\Hugs\Lib\exts\Pretty.lhs..\..\..\lib\exts\NumExts.hs!:\System\Apps\Hugs\Lib\exts\NumExts.hs..\..\..\lib\exts\Memo.hs!:\System\Apps\Hugs\Lib\exts\Memo.hs..\..\..\lib\exts\LazyST.hs!:\System\Apps\Hugs\Lib\exts\LazyST.hs..\..\..\lib\exts\IOExts.hs!:\System\Apps\Hugs\Lib\exts\IOExts.hs..\..\..\lib\exts\Int.hs!:\System\Apps\Hugs\Lib\exts\Int.hs..\..\..\lib\exts\GetOpt.lhs!:\System\Apps\Hugs\Lib\exts\Getopt.lhs..\..\..\lib\exts\Foreign.hs!:\System\Apps\Hugs\Lib\exts\Foreign.hs..\..\..\lib\exts\Dynamic.lhs!:\System\Apps\Hugs\Lib\exts\Dynamic.lhs..\..\..\lib\exts\Concurrent.lhs!:\System\Apps\Hugs\Lib\exts\Concurrent.lhs..\..\..\lib\exts\ConcBase.hs!:\System\Apps\Hugs\Lib\exts\ConcBase.hs..\..\..\lib\exts\ChannelVar.lhs!:\System\Apps\Hugs\Lib\exts\ChannelVar.lhs..\..\..\lib\exts\Channel.lhs!:\System\Apps\Hugs\Lib\exts\Channel.lhs..\..\..\lib\exts\Bits.hs!:\System\Apps\Hugs\Lib\exts\Bits.hs..\..\..\lib\exts\Addr.hs!:\System\Apps\Hugs\Lib\exts\Addr.hs..\..\..\lib\System.hs!:\System\Apps\Hugs\Lib\System.hs..\..\..\lib\Ratio.hs!:\System\Apps\Hugs\Lib\Ratio.hs..\..\..\lib\Random.hs!:\System\Apps\Hugs\Lib\Random.hs..\..\..\lib\Prelude.hs!:\System\Apps\Hugs\Lib\Prelude.hs..\..\..\lib\Numeric.hs!:\System\Apps\Hugs\Lib\Numeric.hs..\..\..\lib\Monad.hs!:\System\Apps\Hugs\Lib\Monad.hs..\..\..\lib\Maybe.hs!:\System\Apps\Hugs\Lib\Maybe.hs..\..\..\lib\Locale.lhs!:\System\Apps\Hugs\Lib\Locale.lhs..\..\..\lib\List.hs!:\System\Apps\Hugs\Lib\List.hs..\..\..\lib\Ix.hs!:\System\Apps\Hugs\Lib\Ix.hs..\..\..\lib\IO.hs!:\System\Apps\Hugs\Lib\IO.hs..\..\..\lib\Complex.hs!:\System\Apps\Hugs\Lib\Complex.hs..\..\..\lib\Char.hs!:\System\Apps\Hugs\Lib\Char.hs..\..\..\lib\Array.hs!:\System\Apps\Hugs\Lib\Array.hs\epoc32\release\marm\rel\hugs.exe!:\system\apps\hugs\hugs.exeHugs February 2000
ESTLIB.DLL!:\System\Libs\ESTLIB.dllStandard C Libraryy
j3EPOC
yhC@A.
=v<y5
v<y5G
ESTLIB-INIT
T_DLL OOM
/System/temp/
ESTLIB-INIT
FFFF86
Posix-%d
Starting CPosixServer
estlib
Posix server
Posix-*
Are you my mother, %S?
Found parent process %S
I've become an orphan
Posix-%d is a top-level process
POpen3 created process %d
Process %d asks am I its mother?
Found child process
Process %d is requesting its inheritance
Process %d appears to have terminated with status %d
POSIXIF (%d)
%F%*E %*N %D %H:%T:%S %Y
Error
STDOUT
ESTLIB Console
Console closed - press any key
estlib
CPipeDesc
%d.%d.%d.%d
assertion "%s" failed: file "%s", line %d
error %d
=v<y5G
Not owner
No such file or directory
No such process
Interrupted system call
I/O error
No such device or address
Arg list too long
Exec format error
Bad file number
No children
No more processes
Not enough space
Permission denied
Bad address
Block device required
Device or resource busy
File exists
Cross-device link
No such device
Not a directory
Is a directory
Invalid argument
Too many open files in system
Too many open files
Not a character device
Text file busy
File too large
No space left on device
Illegal seek
Read-only file system
Too many links
Broken pipe
Math argument
Result too large
No message of desired type
Identifier removed
Deadlock
No lock
Not a socket
Remote address not available
Address not supported by protocol
Socket already connected
Connection refused by remote host
Address already in use
Connection timed out
Not a stream
Stream ioctl timeout
No stream resources
Machine is not on the network
No package
Resource is remote
Virtual circuit is gone
Advertise error
Srmount error
Communication error
Protocol error
Multihop attempted
Bad message
Cannot access a needed shared library
Accessing a corrupted shared library
.lib section in a.out corrupted
Attempting to link in more shared libraries than system limit
Cannot exec a shared library directly
Function not implemented
No more files
Directory not empty
File or path name too long
Saturday
Friday
Thursday
Wednesday
Tuesday
Monday
Sunday
December
November
October
September
August
April
March
February
January
%.2d %2.2d:%2.2d:%2.2d %.4d
%2.2d
%1.1d
%.2d %.4d
%2.2d:%2.2d:%2.2d
/System/temp/t%x.%x
0000000000000000
0123456789abcdef
(null)
0123456789ABCDEF
bug in vfprintf: bad base
ESOCK[10000047].DLL
efsrv[100000bd].dll
euser[100000c1].dll
000D0T0`0l0x0
= =$=(=,=0=4=8=<=@=D=H=L=P=T=X=\=`=d=h=l=p=t=x=|=
4p6`7<8
>X?\?`?d?h?l?p?t?x?|?
X5\5`5d5h5l5p5t5x5
:`;d;
= =$=(=,=0=4=,>`>
2H3L3P3
1H4\4l4
2\4`4d4h4l4@5
0P2T2X2\2
4 5d6h688
l1p1t1x1|1
2 2$2(2,2024282<2@2D2H2L2P2T2X2\2`2d2h2l2p2t2x2|2
5 5$5(5,5054585<5@5D5H5L5P5T5X5\5`5d5h5l5p5t5x5|5
7 7$7(7,7074787<7@7D7H7L7P7T7X7\7`7d7h7l7p7t7x7|7
:\<`<d<h<l<p<t<x<
8 8$8(8,8084888<8@8D8H8L8P8T8X8\8`8d8h8l8p8t8x8|8
5 5$5(5,5054585<5@5D5H5L5P5T5X5\5`5d5h5l5p5t5x5|5
6 6$6(6,6064686<6@6D6H6L6P6T6X6\6`6d6h6l6p6t6
< <$<(<,<0<4<8<<<@<D<H<L<P<T<X<\<`<d<h<l<p<t<x<|<
= =$=(=\?`?d?h?l?p?t?x?|?
0 0$0(0,0004080<0@0D0
1X4d4p4|4
5$505<5H5T5`5l5x5
6 6,686D6P6\6h6t6
7(747@7L7X7d7p7|7
8$808<8H8T8`8l8x8
9 9,989D9P9\9h9t9
:(:4:@:L:X:d:p:|:
;$;0;<;H;T;`;l;x;
< <,<8<D<P<\<h<t<
=(=4=@=L=X=d=p=|=
>$>0><>H>T>`>l>x>
? ?,?8?D?P?\?h?t?
0(040@0L0X0d0p0|0
1$101<1H1T1`1l1x1
2D:H:L:P:T:X:\:`:d:h:
$1(1,1014181<1
4(44484<4@4D4H4L4P4T4X4\4`4d4h4l4p4t4x4|4
5 5$5(5,5054585<5@5D5H5L5P5T5X5\5`5d5h5l5p5t5x5
6$6(6,6064686<6@6D6H6L6P6T6X6\6`6d6h6l6p6t6x6|6
7 7$7(7,7074787<7@7D7H7L7P7T7X7\7`7d7h7l7p7|7
8 8$8(848@8D8P8T8X8\8`8d8h8l8p8t8x8|8
9 9$9(9,9094989<9@9D9H9L9P9T9X9\9`9d9p9t9x9|9
Table1
ColA1
ColB1
ColA2
ColB2
ColA3
ColB3
ColA4
ColB4
"DATA.APP
HBWelcome to the Epoc port of Hugs98, an interpreter for the pure functional programming language Haskell
This is something of a bare-bones port of Hugs that provides only the basic interpreter functionality; there is no special code to support Epoc functionality. This means that you can run Haskell programs that use the standard libraries supported by Hugs but not those that require special support (such as GUI programs). This is much the same as hugs on console platforms such as DOS or Unix without X11 (but see the bugs section of this document for some important differences)
.CThis version of Hugs comes with a small application that appears on
the extras bar and can be used to launch the main interpreter. This
application allows you to set any of the options that can be set on
the command line. These settings are stored in small files that can be
used to store different Hugs configurations for each Haskell program
you work on.
The options for the hugs interpreter can be set via the menus of the launcher application and are discussed in detail in the next section.
If you're the kind of person who would rather run the interpreter manually then you will need the command line environment for Epoc (available from the downloads section of the Symbian website, http://www.symbian.com/). You can run the interpreter as \System\Apps\Hugs\Hugs.exe on the drive you installed it to.
DThe launcher application provides a number of menus that allow you to configure how the Hugs interpreter will be run. Most of these options are simple on-off toggles. Each option corresponds to a single command line argument to the Hugs interpreter. Some of the options will prompt for a value. Note that there is currently a limit of 255 characters in the command line arguments, and so some of the options (such as the path the the libraries and the main module) have had to be artificially shortened.
File Menu This menu allows you to run the Hugs interpreter, select the file used to store the configuration information and exit the launcher application.
Stats menu This menu allows you to select the kinds of informational messages Hugs prints about itself and your programs
Errors menu This menu allows you to select how Hugs behaves when it encounters errors
Literacy This menu allows you select how Hugs deals with literate programs
General This menu allows you set the Hugs options that are not covered by some more specific menu
Options This menu allows you to set the Hugs options that are not simple toggles.
Help This menu allows you to display information about this port of Hugs
%CIn general using hte interpreter is similar to using Hugs on any other platform. There are only a few differences:
Input editing is rudementary (at best) and is described in it's own section, below.
The console has no scrollback, so when more than a screenful of data is displayed there is no way to recover it. The output of the ":h" command is reproduced below for reference purposes because of this.
If you switch away from the interpreter then you will find it on the task list as "STDOUT" (it's not listed as "Hugs" - that's the launcher app). The reason for this name is arcane and has to do with the way Epoc supports console applications).
The interrupt character (Control-C on may systems) is not supported in any way. In general this is not a serious problem, but see the Known Bugs section.
FThe console provided by the Epoc libc is rather basic, so I have supplied a very simple sort of line editing to make the interpreter more usable. The editor has basic backspace handling and a simple command line history. The history is accessed by pressing the ESC key which will put Hugs into edit mode. The hugs prompt will change to "EDIT>" to indicate that normal keyboard input is suspended and instead the following keys are active:
Esc Print the history buffer. This will display the last ten lines typed to Hugs
Any digit Pressing a digit will select that element of the history buffer and copy it into the current command
Space Pressing the space bar will select the most recent line (this is usually history item number 9)
q Pressing q will quit out of edit mode and will revert the current line to whatever it was when edit mode was entered.
h, l Pressing h and l will move the current cursor position left or right one character.
j, k Pressing j and k will select the next and previous lines of the history
^, $ Pressing Caret or Dollar will move the cursor to the start or the end of the current line
D Pressing a capital D will delete everything from the current position to the end of the line
r Pressing r will allow you to replace the character currently under the cursor. If you press escape the replacement will be cancelled, otherwise the next character you type will take the place of the one under the cursor.
This list of editing commands is hardly ideal, but it is enough to allow previous commands to be recalled and corrections to be made without having to retype the entire line. The choice of commands may seem a little odd if you are not in the know: many of these keystrokes are based on those in the vi editor.
DShould you encounter a problem with this version of hugs the first thing to do is report it to me, ideally by sending email to Glenn.Strong@cs.tcd.ie. Despite what the Hugs startup banner says you should not report bugs directly to the hugs team. They are not responsible for this port and they probably wouldn't appreciate being bothered by bugs in a package they do not distribute. The most likely source of bugs is me breaking something during the porting process.
It may be worth checking whether there is an updated release that solves your problem. Currently the latest version will be available on the WWW at the URL http://www.cs.tcd.ie/Glenn.Strong/epoc/hugs.html
To help sort out your problem it would be best if you could give me as much information as possible, including the version of the port you have (check the About: dialog box of the launcher if you are not sure what version you are using), your machine type (e.g. Psion series 5) and a description of the problem (of course). I can't make any promises about fixing the problem, but I will certainly try. See the Known Bugs section for cases where I have tried and failed (or just not tried).
BHugs is
1994-99 Mark P Jones, Alastair Reid, the Yale Haskell Group, and the Oregon Graduate Institute of Science and Technology, 1994-1999, All rights reserved, and is distributed as free software under the terms of the license described in the LICENSE section of this document.
The original source for Hugs98 is available from http://www.haskell.org/hugs
This port by Glenn Strong <Glenn.Strong@cs.tcd.ie> is available from http://www.cs.tcd.ie/Glenn.Strong/epoc/
I extended Keith Walker's CE32Base OPX to write the launcher application.
Thanks to everyone who helped (and continue to help) beta test this application. Without your feedback this application probably wouldn't run on any machine but my own.
I have had reports that the application doesn't work at all for some Revo users, claiming to be unable to find the libraries. I have been unable to reproduce the problem on a colleagues revo, and any more information would be appreciated. Apparently using an older version of the port (1.05, for instance) cures this, although it also removes the benefits of the later versions.
The interrupt caracter (Control-C on many systems) is not supported. This is more serious than it first appears, as you will find out if you enter "[1..]" at the interpreter prompt. The only thing you can do if the interpreter is caught in an infinte evaluation is shut down the interpreter from outside. While the system button doesn't work when the interpreter is evaluating (it isn't paying attention to input in the right way) you can still press Control-System to get a task list and then close the process called "STDOUT". In an emergency you can use the key Control-Fn-K which should kill the foreground process. This is something of a last resort, of course. The interrupt key is not supported (basically) because the Epoc standard library does not currently support signals. Hopefully, this bug is probably not too big a problem since people have a tendancy not to try to print infinte lists...
Tab characters interact badly with backspace in the edit routines. At the interpreter prompt you can enter and leave edit mode to get the line to redisplay correctly. The problem is that the EPOC console I'm using doesn't support a proper backspace character, so I fake it by overprinting spaces, which doesn't work for tabs which display as more than one character.
1999/07/08: Version 1.00: Initial release (labelled Alpha)
1999/07/13: Version 1.01: Fixed a bug in the input routines related to lines over forty characters.
1999/07/20: Version 1.02: Fixed a bug in the getch() routine to allow Haskell programs to handle backspace better.
1999/07/30: Version 1.03: Completely rewrote the input routines to allow basic command line editing. Added "Pwd" command.
1999/08/07: Version 1.04: Fixed a couple of minor cosmetic bugs in line editing.
1999/11/02: Version 1.05: Updated to September 1999 Hugs, a new release of the core Hugs distribution. Minor documentation and code updates.
2000/03/05: Version 1.06: Updated to February 2000 Hugs. I also took the opportunity to make a few small changes to the input routines. The February 2000 release of Hugs fixes the following problems (text from the original hugs documentation):
If you defined an instance which inherited a method via a superclass, hugs would go into an infinite loop. Fortunately, most people weren't doing this (except Chris Okasaki...).
There were a couple of holes in the implementation of implicit parameters (`with' wasn't always being scoped properly, sometimes capturing implicit parameters outside of its scope).
Functional dependancies weren't being properly propogated in some cases with derived instances (`instance P ... => Q ...').
2000/09/22: Version 1.07: Included a new front end application to launch Hugs so that EShell is not required.
The Hugs 98 system is Copyright (c) Mark P Jones, Alastair Reid, the
Yale Haskell Group, and the Oregon Graduate Institute of Science and
Technology, 1994-1999, All rights reserved, and is distributed as free
software under the following license.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither name of the copyright holders nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND THE CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDERS OR THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IntroductionR
Hugs!
Running HugsR
Hugs!
Menus and OptionsR
Hugs!
Using the InterpreterR
Hugs!
Input EditingR
Hugs!
The Hugs InterpreterR
THIS SECTION MUST BE ADDED BY HAND (ALEPPO CAN'T HANDLE THE SPECIAL FONT REQUIREMENTS)
Hugs!
Reporting ProblemsR
Hugs!
Copyrights and CreditsR
Hugs!
Known BugsR
Hugs!
Version HistoryR
Hugs!
LicenseR
Hugs!
Table1
title
synonym
The Hugs interpreter supports a number of commands at the prompt - a list may be obtained by typing ":?" to the hugs prompt. I have added one command to this list:
:Pwd Print current directory (note the capital P to avoid a clash with the :project command).
Although the commands can be listed using :?, the Epoc console usually does not have enough lines to display all of them. Note that not all of the commands work in this port - the :edit commands, for instance, do
nothing. The output of :? is reproduced here for ease of reference:
Prelude> :?
LIST OF COMMANDS: Any command may be abbreviated to :c where
c is the first character in the full name.
:load <filenames> load modules from specified files
:load clear all files except prelude
:also <filenames> read additional modules
:reload repeat last load command
:project <filename> use project file
:edit <filename> edit file
:edit edit last module
:module <module> set module for evaluating expressions
<expr> evaluate expression
:type <expr> print type of expression
:? display this list of commands
:set <options> set command line options
:set help on command line options
:names [pat] list names currently in scope
:info <names> describe named objects
:browse <modules> browse names defined in <modules>
:xplain <context> explain instance resolution for <context>
:find <name> edit module containing definition of name
:!command shell escape
:cd dir change directory
:Pwd print working directory
:gc force garbage collection
:quit exit Hugs interpreter
Prelude>
There are two sets of things you can set with :set. The first are toggles (use a leading "-" to deactivate or a leading "+" to activate):
s Print no. reductions/cells after eval
t Print type after evaluation
f Terminate evaluation on first error
g Print no. cells recovered after gc
l Literate modules as default
e Warn about errors in literate modules
. Print dots to show progress
q Print nothing to show progress
w Always show which modules are loaded
k Show kind errors in full
o Allow overlapping instances
u use "show" to display results
i Chase imports while loading modus
x Explain instance resolution
m Use multi instance resolution
98 Set Haskell 98 compatibility
Then there are the other options. A leading + or - makes no difference to these
hnum Set heap size (cannot be changed within Hugs)
pstr Set prompt string to str
rstr Set repeat last expression string to str
Pstr Set search path for modules to str
Estr Use editor setting given by str
cnum Set constraint cutoff limit
dnum Gather profiling statistics every <num> reductions
Courier New
Courier New
Arial
Times New Roman
Courier New
Times New Roman
Arial
Arial
Times New Roman
Arial
Times New Roman
Arial
Times New Roman
Courier New
IntroductionR
Hugs!
Running HugsR
Hugs!
Menus and OptionsR
Hugs!
Using the InterpreterR
Hugs!
Input EditingR
Hugs!
The Hugs InterpreterR
Hugs!
Reporting ProblemsR
Hugs!
Copyrights and CreditsR
Hugs!
Known BugsR
Hugs!
Version HistoryR
Hugs!
LicenseR
Hugs!
C:\Programs\Frontends\Hugs.pre
TBARLINK
Z:\System\Opl\Toolbar.opo
MainLoopO
TOGGLES%
TOGGLENAMES$
TOGGLEKEYS%
TOGGLECMD$
NUMOPTS&
NUMOPTNAMES$
NUMOPTKEYS%
NUMOPTCMD$
NUMOPTMIN&
NUMOPTMAX&
STROPTS$
STROPTLEN%
STROPTNAMES$
STROPTKEYS%
STROPTCMD$
DOCUMENTNAME$
LASTUSEDFILE$
DONE%
PROGNAME$
HELPFILE$
HELPTHREAD&
INITIALIZE
LOADINI
TBARINIT
TBARBUTT
SYSTEMEVENT
TBARSHOW
TBAROFFER%
SETUPMENU
SETNUMOPT
SETSTROPT
SETMAINMODULE
RUNHUGS
OPENFILE
NEWFILE
CMDSL%
SAVEOPTIONS
SAVEINI
TBWIDTH%
:\System\Apps\Hugs\Hugs.exeK
:\System\Apps\Hugs\Hugs.hlpK
:\system\apps\hugs\bitmaps.mbmK
Run HugsO
+ Heap SizeO
ModuleO
HelpO
gO gP O
'{A`[{
+ Open File
File,Folder,DiskO
Cancel(
+ Open File
File,Folder,DiskO
Cancel(
About...
Hugs launcher+
2000
+"http:\\www.cs.tcd.ie\Glenn.Strong\
Glenn.Strong@cs.tcd.ie
Version O
TOGGLES%
TOGGLENAMES$
TOGGLEKEYS%
TOGGLECMD$
NUMOPTS&
NUMOPTNAMES$
NUMOPTKEYS%
NUMOPTCMD$
NUMOPTMIN&
NUMOPTMAX&
STROPTS$
STROPTNAMES$
STROPTKEYS%
STROPTCMD$
STROPTLEN%
Print Reductions
Print Type
Stop on First Error
Trace Garbage Collections
Literate modules by default
Warn about literate errors
Print dots for progress
Print nothing for progress
Show loaded modules
Show kind errors in full
Use show for results
Chase Imports
Explain instance resolution
Haskell 98
+ Heap size
Constraint cutoff
Prompt
Repeat string
+*{Hugs}\lib;{Hugs}\lib\hugs;{Hugs}\lib\exts
Main module
Too many keyless options!+
Bug in initialize!W8
MENUBOOL%
TOGGLENAMES$
TOGGLEKEYS%
TOGGLES%
NUMOPTNAMES$
NUMOPTKEYS%
STROPTNAMES$
STROPTKEYS%
File+
Run HugsOR+
Create new file...On+
Open file...Oo+
CloseOe
StatsO
ErrorsO
LiteracyO
GeneralO
g" g# g$ +
OptionsO
Help+
HelpOh+
About...Oa
ONFLAGS$
OFFFLAGS$
OTHERFLAGS$
TOGGLES%
TOGGLECMD$
TOGGLES%
TOGGLECMD$
NUMOPTCMD$
NUMOPTS&
TOGGLES%
TOGGLECMD$
STROPTS$
STROPTCMD$
g+$g,$
gZ$g\$g]$
GETOPTIONS$
PROGNAME$
DONE%
Problem!+
Can't run Hugs+
Errorcode
STROPTS$
Set main module
File,Folder,DiskO
Cancel(
No FileOn+
NEWFILE
OPENFILE
RESUMEFILE
DONE%
SAVEOPTIONS
TOOLBARSETTITLE
DOCUMENTNAME$
LASTUSEDFILE$
TOOLBARSETTITLE
LOADOPTIONS
DOCUMENTNAME$
LASTUSEDFILE$
OPENFILE
NEWFILE
LASTUSEDFILE$
go*gp*
TBARSETTITLE
DOCUMENTNAME$
TOGGLES%
NUMOPTS&
STROPTS$
,+ Saving...
TOGGLES%
NUMOPTS&
STROPTS$
LOADING...
LASTUSEDFILE$
c:\system\apps\hugs\hugs.iniO
C:\System\Apps\HugsW
C:\System\Apps\Hugs
0vg)0+
Loading...
LASTUSEDFILE$
c:\system\apps\hugs\hugs.iniO
gO1+ Saving...
RUNHUGS
SETNUMOPT
SETMAINMODULE
HELPTHREAD&
HELPFILE$
NUMOPTNAMES$
NUMOPTS&
NUMOPTMIN&
NUMOPTMAX&
Cancel(
gN4W7
STROPTS$
STROPTLEN%
STROPTNAMES$
CancelO
5W7['
MAIN3
MAINLOOP
INITIALIZE[
SETUPMENU
GETOPTIONS$
ONFLAGS$
OFFFLAGS$g
OTHERFLAGS$
RUNHUGS:
SETMAINMODULE
SYSTEMEVENT
NEWFILEO
OPENFILE
RESUMEFILEi
TOOLBARSETTITLE
SAVEOPTIONSs
LOADOPTIONS
LOADINI
SAVEINIi
CMDSR%0
CMDSH%S
CMDSM%|
CMDSL%
SETNUMOPT
SETSTROPT
MENUBOOL%
RPROCESS
SYSTEM\
53333S
G3cff63t
09#www
G3cff63t
53333S
kE4 3
93sI3S
3C5!"
13C%!
H433C
kE4 3
9d9G8
ZD3#2
wwV3Cu
This file contains a list of predicate definitions that will automatically
be read into Mini Prolog at the beginning of a session. Each clause in this
file must be entered on a single line and lines containing syntax errors are
always ignored. This includes the first few lines of this file and provides