Notes on installing Hugs and Emacs for COMP 15 on Win32 platforms

We are going to install

      Hugs ... to run Haskell programs
      Emacs ... to edit Haskell programs

Using a web browser, all the components we need can be downloaded
This folder also includes these instructions.

The emacs editor is optional if you have another text editor.
Few editors have the features of emacs, however.  For example, this version
provides a "hugs" mode for improved display and editing of Haskell

1. Hugs
Hugs is an interpreter for the Haskell language. We will be using the 
June-98 release of hugs.  Although this is no longer the latest version
of hugs, it is entirely sufficient for our class.

To install Hugs, copy the executable file


into a temporary folder on your machine.  Next, run this program, which
will create, within your temporary folder, a `disk1' folder which in turn
contains a Setup program.

Execute this Setup program. Be sure to specify `C:\Program Files\hugs' as 
the destination folder for hugs (so don't accept the default location of
`C:\hugs'). After this step accept the default installation options. 

Test hugs by calling it from the Start Menu (under Programs) and typing 1+1 
(followed by the enter key).  You should see the expected answer.  Type 
":quit" to exit hugs.

Extensive documentation for hugs has been installed along the way and
you can access it locally on your machine from 
C:\Program Files\hugs\docs\index.html, or via the course web page.

2. Emacs
We use the NTEmacs port of Emacs-20. More information on this port can
be found on the web at
Here are the necessary steps:

        (0) Copy the file to a temporary folder on your machine

	(1) Unzip the contents of emacs-20 zip archive into
            `C:\Program Files'. This will create an emacs-20 folder
            underneath Program Files.

	(2) Open a DOS command prompt window (from the Start menu, listed
            under Programs)

        (3) Issue the command

            C:\Progra~1\emacs-20\bin\addpm C:\Progra~1\emacs-20

	    This initializes some system parameters in Windows' registry 
	    to let emacs know where to find the emacs installation.

Emacs can now be called from the Start Menu. It is located under the entry
GNU Emacs.  Test emacs by calling it from the Start Menu and editing a 
simple file.

If hugs is already installed, emacs should be able to call hugs. To test
this, load some Haskell file from the hugs demos folder, causing Emacs to 
enter hugs-mode, then enter

	M-x hugs-start-process

Emacs should then launch the hugs interpreter as a subprocess which
can be controlled through the buffer `*hugs*'.

Emacs comes with extensive documentation that can be accessed from the
Help menu. As a first start, go through the tutorial to get a feel for
editing with Emacs.

Note that the directory ..\emacs-20\site-lisp\ is not empty but
contains the files

	hugs-mode.el, hugs-mode.elc, and site-start.el

In case you update emacs, please make sure to copy these files.

[If you install on Win95 or Win98 architectures you may need the
following line

	shell=C:\COMMAND.COM C:\ /e:4096 /p

in your CONFIG.SYS file to increase the environment space set aside by

3. Clean-up
If everything worked out fine, the temporary folder(s) created in the
installation steps can be deleted.