5
This is the Haskell mode package for Emacs. Its use should be mostly
6
self-explanatory if you're accustomed to Emacs.
8
When Emacs is started up, it normally runs a file called ~/.emacs located in
9
your home directory. This file should contain all of your personal
10
customisations written as a series of Elisp commands. In order to install
11
the Haskell mode, you have to tell Emacs where to find it. This is done by
12
adding some commands to the init file.
17
- If you are using XEmacs, the haskell-mode package may be available for
18
installation through the XEmacs package UI.
20
- If you are using Debian, you may be able to install the package
21
haskell-mode with a command like "apt-get install haskell-mode".
25
- Download and unpack the basic mode and modules into a suitable directory,
26
e.g. ~/lib/emacs/haskell-mode/ where ~ stands for your home directory.
28
- Assuming you have placed the basic mode haskell-mode.el and the modules
29
you want to use in the directory ~/lib/emacs/haskell-mode/, add the
30
following command to your init file (~/.emacs):
32
(load "~/lib/emacs/haskell-mode/haskell-site-file")
34
adding the following lines according to which modules you want to use:
36
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
37
(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
38
;;(add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent)
40
Note that the two indentation modules are mutually exclusive - add at
41
most one. Note that the line of code for simple indentation is commented
42
out (using a preceeding ;) in preference for the more advanced
43
indentation module. Installation is now complete!
45
The other modules are automatically loaded when needed in the following way:
47
- Font locking: just turn it on via `global-font-lock-mode' or do
48
(add-hook 'haskell-mode-hook 'font-lock-mode)
50
- Declaration scanning: just use M-x imenu or bind `imenu' to a key. E.g.
51
(global-set-key [(control meta down-mouse-3)] 'imenu) or you can also add
52
it to the menubar with (add-hook 'haskell-mode-hook 'imenu-add-menubar-index)
54
- Interaction with inferior Haskell interpreter: just hit C-c C-z or C-c C-l.
60
Most customizations are on the functionality of a particular module.
61
See the documentation of that module for information on its
68
It seems that some version of XEmacs come without the fsf-compat package
69
(which provides functions such as `line-end-position') and it seems that
70
even if your XEmacs does have the fsf-compat package installed it does not
71
autoload its part. Thus you may have to install the fsf-compat package and
72
add (require 'goto-addr) in your .emacs.
78
Any problems, do mail me <monnier@iro.umontreal.ca> and I will try my best
83
<!-- arch-tag: 25fc8494-611d-459f-9919-579c97f6313e -->