[Partial fixup. monnier**20041126000052 Ignore-this: daea8c115b1fcf62c4b2c79bc1d250f ] hunk ./index.html 1 - + hunk ./index.html 3 -Haskell Mode for Emacs +Haskell Mode for Emacs hunk ./index.html 5 - + hunk ./index.html 7 -

Haskell Mode for Emacs

+

Haskell Mode for Emacs

hunk ./index.html 9 -

The Haskell mode itself is very basic, but provides a base on which to -build modules. The currently supported modules are:

+

The Haskell mode itself is very basic, but provides a base on which to + build modules. The currently supported modules are:

hunk ./index.html 12 - +Work on further modules is encouraged! Please + mail if you have an idea, or + a module we might hook into. hunk ./index.html 41 -Work on further modules is encouraged! Please mail if you have an idea, or a -module we might hook into. +

The latest versions of the basic mode + and the above modules.

hunk ./index.html 44 -

The latest versions of the basic -mode and the above modules.

+

The basic mode was written by Graeme E Moss, Tommy Thorn and Simon + Marlow. Modules with their own links above are maintained by their + authors; the rest are looking for a maintainer (please + volunteer!). These modules support Haskell 98, except where stated, and + have been tested on GNU Emacs versions 19.34 and 20.7, and XEmacs versions + 21.1.14 and 21.4.x. Please mail bugs and suggestions to the maintainer of + the appropriate module. General comments can be mailed + to Stefan + Monnier. When mailing, quote the version of the module or mode you + are using, the version of Emacs you are using, and a small example of the + problem or suggestion. Please check the list of known problems (towards + the start of each relevant file) before doing so.

hunk ./index.html 57 -

The basic mode was written by Graeme E Moss, Tommy Thorn and Simon -Marlow. Modules with their own links above are maintained by their -authors; the rest are looking for a maintainer (please volunteer!). These -modules support Haskell 98, except where stated, and have been tested on -GNU Emacs versions 19.34 and 20.7, and XEmacs versions 21.1.14 and 21.4.x. -Please mail bugs and suggestions to the maintainer of the appropriate -module. General comments can be mailed to Simon Marlow. When mailing, quote -the version of the module or mode you are using, the version of Emacs you -are using, and a small example of the problem or suggestion. Please check -the list of known problems (towards the start of each relevant file) -before doing so.

+

A guide on how to install +and customise the mode.

hunk ./index.html 60 -

A guide on how to install -and customise the mode.

+

To test the mode:

hunk ./index.html 62 -

To test the mode:

+ - - + hunk ./installation-guide.html 1 - + hunk ./installation-guide.html 3 -Haskell Mode for Emacs: Installation Guide +Haskell Mode for Emacs: Installation Guide hunk ./installation-guide.html 5 - + hunk ./installation-guide.html 7 -

Haskell Mode for Emacs: Installation Guide

+

Haskell Mode for Emacs: Installation Guide

hunk ./installation-guide.html 9 -

When Emacs is started up, it normally runs an file called -.emacs located in your home directory. This file should -contain all of your personal customisations written as a series of -Elisp commands. In order to install the Haskell mode, you have to -tell Emacs where to find it. This is done by adding some commands to -the init file.

+

When Emacs is started up, it normally runs a file + called ~/.emacs located in your home directory. This file + should contain all of your personal customisations written as a series of + Elisp commands. In order to install the Haskell mode, you have to tell + Emacs where to find it. This is done by adding some commands to the init + file.

hunk ./installation-guide.html 16 -

Installation

+

Installation

hunk ./installation-guide.html 18 - hunk ./installation-guide.html 26 -

Otherwise:

+

Otherwise:

hunk ./installation-guide.html 28 - hunk ./installation-guide.html 72 -
    -
  1. We must ensure that the directory containing -haskell-mode.el is on the load-path of -Emacs. You can examine the value of the load-path by -typing C-h v load-path in an Emacs session. Supposing -that you've placed haskell-mode.el in the directory -~/lib/emacs, if this directory is not on the -load-path we add it with:

    +

    For those interested, each command above shall now be explained.

    hunk ./installation-guide.html 74 -
    (setq load-path (cons "~/lib/emacs" load-path))
    +
      +
    1. We must ensure that the directory + containing haskell-mode.el is on + the load-path of Emacs. You can examine the value of + the load-path by typing C-h v load-path in + an Emacs session. Supposing that you've + placed haskell-mode.el in the + directory ~/lib/emacs, if this directory is not on + the load-path we add it with:

      hunk ./installation-guide.html 84 -

      The function setq sets the value of a variable, and the -function cons takes an element and a list and creates a -new list with the former as head and the latter as tail, as in -Haskell.

      +
      (setq load-path (cons "~/lib/emacs" load-path))
      hunk ./installation-guide.html 86 -
    2. It is possible (and desirable) for Emacs to enter a specific -mode according to the name of the file being edited/visited. The -variable auto-mode-alist tells Emacs what mode to run -according to which regular expression matches the filename. We wish -to run the Haskell mode on all files ending in .hs, -.hi (interface file) and .gs (Gofer file), -and to run the Haskell mode for literate scripts on all files ending -in .lhs and .lgs. To do this, we need to -add pairs of the form (regexp -. mode-function). We use the function -append to append a list of three such pairs to the end of -the value of auto-mode-alist. A list in Elisp is written -within round parantheses with elements separated by whitespace. A -list is treated as a function application unless it is quoted with -', which is what we do.

      +

      The function setq sets the value of a variable, and the + function cons takes an element and a list and creates + a new list with the former as head and the latter as tail, as in + Haskell.

      hunk ./installation-guide.html 91 -
    3. In order for Emacs to know where to find the definition of our -mode functions, haskell-mode and -literate-haskell-mode, we must use the function -autoload. Both mode functions can be found in the file -haskell-mode.el which was downloaded in the first -installation step (the .el extension is left off and -assumed by Emacs). As we have already ensured that this file is on -the load-path we need only give the filename and not the -directory. Its use is quite straightforward but for further -information, see its documentation by entering C-h f -autoload in an Emacs session.

      +
    4. It is possible (and desirable) for Emacs to enter a specific mode + according to the name of the file being edited/visited. + The variable auto-mode-alist tells Emacs what mode to run + according to which regular expression matches the filename. We wish + to run the Haskell mode on all files ending + in .hs, .hi (interface file) + and .gs (Gofer file), and to run the Haskell mode for + literate scripts on all files ending in .lhs + and .lgs. To do this, we need to add pairs of the + form (regexp . mode-function). We use + the function append to append a list of three such pairs + to the end of the value of auto-mode-alist. A list in + Elisp is written within round parantheses with elements separated by + whitespace. A list is treated as a function application unless it is + quoted with ', which is what we do.

      hunk ./installation-guide.html 107 -
    5. Each function turn-on-haskell-module -turns on the corresponding module. Adding such a function as a hook -to the Haskell mode will turn on that module when the mode is used. -Note that each of these modules may slow down Emacs, especially for -large files.

      +
    6. In order for Emacs to know where to find the definition of our mode + functions, haskell-mode + and literate-haskell-mode, we must use the + function autoload. Both mode functions can be found in + the file haskell-mode.el which was downloaded in the + first installation step (the .el extension is left off + and assumed by Emacs). As we have already ensured that this file is + on the load-path we need only give the filename and not + the directory. Its use is quite straightforward but for further + information, see its documentation by entering C-h + f autoload in an Emacs session.

      hunk ./installation-guide.html 119 -
    +
  2. Each function turn-on-haskell-module turns on + the corresponding module. Adding such a function as a hook to the + Haskell mode will turn on that module when the mode is used. + Note that each of these modules may slow down Emacs, especially for + large files.

    hunk ./installation-guide.html 125 -

    Customisation

    +
hunk ./installation-guide.html 127 -

Most customisations are on the functionality of a particular -module. See the documentation of that module for information on its -customisation.

+

Customisation

hunk ./installation-guide.html 129 -

Support

+

Most customisations are on the functionality of a particular module. + See the documentation of that module for information on its + customisation.

hunk ./installation-guide.html 133 -

Any problems, do mail and we will -try our best to help you!

+

Support

hunk ./installation-guide.html 135 -

Haskell Mode Home Page.

+

Any problems, do mail and we + will try our best to help you!

+ +

Haskell Mode Home Page.