Next: Editing Haskell Code, Previous: Introduction, Up: Top [Index]
Haskell Mode is distributed as a package in MELPA repository. To use MELPA as Emacs package archive do the following:
package-archives
using
M-x customize-option RET package-archives
Archive name: melpa-stable URL or directory name: http://stable.melpa.org/packages/
M-x package-refresh-contents
M-x package-install RET haskell-mode RET
Voila! haskell-mode
is installed! You should be able to edit Haskell
source code in color now.
The above steps should result in the following snippet in your .emacs:
(require 'package) (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(package-archives (quote (("gnu" . "http://elpa.gnu.org/packages/") ("melpa-stable" . "http://stable.melpa.org/packages/")))))
Haskell Mode supports GNU Emacs versions 24.3+, including 25 (snapshot).
Haskell Mode is available from melpa-stable (releases) and melpa (git snapshots).
Other means of obtaining haskell-mode
include
el-get,
Emacs Prelude and
Debian package.
Last version of haskell-mode
that supported Emacs 23, 24.1, and 24.2 is
haskell-mode
13.16 available at
https://github.com/haskell/haskell-mode/releases/tag/v13.16.
Most of Haskell Mode’s settings are configurable via customizable
variables (see (emacs)Easy Customization, for details). You can use
M-x customize-group RET haskell to browse the haskell
customization sub-tree.
One of the important setting you should customize is the
haskell-mode-hook
variable (see (emacs)Hooks) which gets run
right after the haskell-mode
major mode is initialized for a
buffer. You can customize haskell-mode-hook
by
M-x customize-variable RET haskell-mode-hook
There you can enable or disable a couple of predefined options or add any function to the list.
Next: Editing Haskell Code, Previous: Introduction, Up: Top [Index]