git clone 'git://github.com/haskell/haskell-mode.git'
This is an Emacs mode for editing, debugging and developing Haskell programs.
haskell-mode is best installed as a package.
haskell-mode you need to add a package archive repository that distributes
M-x customize-option RET package-archives
Archive name: melpa-stable URL or directory name: http://stable.melpa.org/packages/
Fetch list of packages with
and then follow by
M-x package-install RET haskell-mode
haskell-mode is installed! You should be able to edit Haskell
source code in color now.
You need to enable indentation as this does not happen automatically currently. Add this line to your ~/.emacs file:
(add-hook 'haskell-mode-hook 'haskell-indentation-mode)
Haskell-mode has much much much more to offer but the above should get you
For setup instructions, please consult the integrated
manual which can be accessed after installation via
info-display-manual [RET] haskell-mode. Alternatively, you can also
direct your browser to the
the online haskell-mode manual
for setup and user guide.
haskell-mode supports GNU Emacs versions 23, 24 and upcoming 25
haskell-mode is available from melpa-stable (releases) and melpa
Other means of obtaining
Emacs Prelude and Debian package.
Emacs23 requires an the use of “cl-lib”. cl-lib.el can be found in the tests/compat directory. Copy cl-lib.el to your emacs directory, e.g. ~/.emacs.d directory and put
(add-to-list 'load-path "~/.emacs.d/") (require 'cl-lib)
in your .emacs file.
haskell-mode directly from sources is easy but
requires a little preparation:
git clone https://github.com/haskell/haskell-mode.git into a
suitable directory, e.g.
stands for your home directory.
Assuming you have unpacked the various haskell-mode modules
haskell-mode.el and the rest) in the directory
~/lib/emacs/haskell-mode/, you need to generate various files, the
autoloads file (
haskell-mode-autoloads.el) is one among
and then adding the following command to your
(add-to-list 'load-path "~/lib/emacs/haskell-mode/") (require 'haskell-mode-autoloads) (add-to-list 'Info-default-directory-list "~/lib/emacs/haskell-mode/")
If you followed the above you are just a couple of steps away from
haskell-mode is activelly seeking contributions from users of
haskell-mode. For more information have a look at
the wiki page on contributing.