Running hugs on efd
You can start Hugs with> /usr/local/cs/bin/hugsinitcs will make it availble by a simple
> hugs
If you prefer to run it under emacs you have to instruct emacs to execute some commands when it opens a Haskell file. The file hs-mode.el contains the commands. They are written using a special Lisp dialect; Most of emacs is implemented in this language.
- Create a file ".emacs" in your home directory. If you already have one it should be safe to add commands at the beginning of the file. Emacs will execute theses commands when it starts.
- It is convenient to have all .el files in a special directory, e.g. ~/lib/emacs. Put hs-mode.el there.
- You have to tell emacs that it should look for .el files in this
directory, and load this particular file when you enter the haskell
mode with ALT-X hs-mode (or ESC X hs-mode). You can even instruct emacs to
enter the haskell mode automatically when
you open a file with a name ending with ".hs".
Add the following lines to the beginning of your .emacs file.
(add-to-list 'load-path "~/lib/emacs") (autoload 'hs-mode "hs-mode" "Major mode for editing Haskell files." t) (add-to-list 'auto-mode-alist '("\\.hs$" . hs-mode))
If you are using emacs then keep it open after saving the file. Then it is easer to correct misprints. - Start a new emacs instance and open a file with the extension ".hs". A Haskell menu should appear where you can start Hugs and load files.
- If emacs cannot find hugs you have to change the shell environement variable PATH to include the directory where the hugs binary resides or change the value of the variable hs-file-name in the hs-mode.el file to the full path name of hugs.