This is an Emacs mode for editing, debugging and developing Haskell programs.
Make sure you have this in your init file (usually
~/.emacs). If you already have
custom-set-variables, merge its contents:
(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/")))))
Then run emacs, and evaluate:
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.
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.
Installation - more information
haskell-mode supports GNU Emacs versions 23, 24 and upcoming 25
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.
Installation from git repository
haskell-mode directly from sources is easy but
requires a little preparation:
git clone https://github.com/haskell/haskell-mode.gitinto a suitable directory, e.g.
~stands for your home directory.
Assuming you have unpacked the various haskell-mode modules (
haskell-mode.eland 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 them. Invoke:
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 actively seeking contributions from users of
haskell-mode. For more information have a look at
the wiki page on contributing.
Getting in contact