Updated documentation on the :edit command.

Edit file :edit [file]

The :edit commands starts an editor program to modify or view a
Haskell module. The default is for Hugs to suspend while the editor is
running. When the editor terminates, the Hugs session is resumed and
any files that have been changed will be reloaded automatically. The
-E option can be used to configure Hugs to your editor of choice
(see below.)

If no filename is specified, then Hugs uses the name of the last file
it tried to load. This allows the :edit command to integrate smoothly
with the facilities for loading files.

For example, suppose that you want to load four files, f1.hs f2.hs
f3.hs and f4.hs into the interpreter, but the file f3.hs contains an
error of some kind. If you give the command:

:load f1.hs f2.hs f3.hs f4.hs

then Hugs will successfully load f1.hs and f2.hs, but will abort the
load command when it encounters the error in f3.hs, printing an error
message to describe the problem that occurred. Now, if you use the
command:

:edit

then Hugs will start up the editor with the cursor positioned at the
relevant line of f3.hs (whenever this is possible) so that the error
can be corrected and the changes saved in f3.hs. When you close down
the editor and return to Hugs, the interpreter will automatically
attempt to reload f3.hs, and then, if successful, go on to load the
next file, f4.hs. So, after just two commands in Hugs, the error in
f3.hs has been corrected and all four of the files on the original
command line ahve been loaded into the interpreter, read for use.

* Configuring what editor to use
================================

The -E option controls how Hugs invokes an editor. For example, to
have Hugs invoke 'vi' to edit your files, use

   -Evi

The -E string is actually a template string that gets expanded
by Hugs, via the following rules:

 * all occurrences of %d are replaced by the line number of where
   the last error occurred (if any). Please consult your editor's
   documentation to 
   
 * all occurrences of %s are replaced by the name of the file.
   If an occurrence of %s is both preceded by and followed
   by space, the filename is enclosed in double-quotes.

 * all occurrences of %f are replaced by the absolute filename
   (provided your platform lets you find the absolute path to a
   file.) Most of the time, %s will be just fine, but in case your
   editor doesn't handle relative  filenames correctly, try
   using %f.

 * all occurrences of %% are substituted by %.

 * (win32 only): if the -E string is prefixed with the character '&',
   then the invocation is asynchronous, that is, the editor process
   is created, but Hugs won't wait for the editor to terminate.

 * (win32 only): if the -E string is prefixed with the character '!',
   then the invocation will be asynchronous and use the underlying
   command processor/shell to execute the command.

If neither %s nor %f occurs within the -E string, then the filename is
appended before invoking the editor.

Here are some example editor configurations:

  * TextPad
  
       -E"c:/Program Files/TextPad 4/textpad \"%s\"(%d)"
       
  * vim

       -E"vim +d %s"

  * gnuclient (for use with (X)Emacs)
  
       -E"gnuclient +%d %s"

