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
RET.
Archive name: melpa-stable
and URL or directory name: http://stable.melpa.org/packages/
.
package-refresh-contents
.
haskell-mode
using 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 and upcoming 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 is
haskell-mode
13.18 available at
https://github.com/haskell/haskell-mode/releases/tag/v13.18.
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.
Next: Editing Haskell Code, Previous: Introduction, Up: Top [Index]