Haskell Mode is distributed as a package in MELPA repository. To use MELPA as Emacs package archive do the following:
M-x customize-option RET package-archives
Archive name: melpa-stable URL or directory name: http://stable.melpa.org/packages/
M-x package-install RET haskell-mode RET
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
Emacs Prelude and
Last version of
haskell-mode that supported Emacs 23, 24.1, and 24.2 is
haskell-mode 13.16 available at
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
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
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.