Difference between revisions of "Emacs/Installing haskell-mode"

From HaskellWiki
Jump to navigation Jump to search
(First commit.)
 
m (Added next link.)
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
  +
[[Category:Emacs|*]]
  +
{{Haskell infobox}}
  +
 
=== Where to get haskell-mode ===
 
=== Where to get haskell-mode ===
   
 
The source for the package is currently hosted on [https://github.com/haskell/haskell-mode the Haskell organization on Github.] The installation procedure is documented there.
 
The source for the package is currently hosted on [https://github.com/haskell/haskell-mode the Haskell organization on Github.] The installation procedure is documented there.
   
On Debian you can use your package manager :
+
On Debian you can use your package manager:
   
 
$ apt-get install haskell-mode
 
$ apt-get install haskell-mode
Line 32: Line 35:
   
 
Installation is now complete!
 
Installation is now complete!
  +
  +
----
  +
  +
'''Next:''' [[Emacs/Keybindings_and_simple_usage|Keybindings and simple usage]]

Revision as of 10:13, 19 May 2012

Emacs for Haskell

Inferior Haskell processes
Automatic unit testing
Automatic building
API searching
Project navigation
Snippets
Literate programming

Where to get haskell-mode

The source for the package is currently hosted on the Haskell organization on Github. The installation procedure is documented there.

On Debian you can use your package manager:

   $ apt-get install haskell-mode

Installation

Download and unpack the basic mode and modules into a suitable directory, e.g. ~/lib/emacs/haskell-mode/ where ~ stands for your home directory.

Assuming you have placed the basic mode haskell-mode.el and the modules you want to use in the directory ~/lib/emacs/haskell-mode/, add the following command to your init file (~/.emacs):

   (load "~/lib/emacs/haskell-mode/haskell-site-file")

adding the following lines according to which modules you want to use. They are all optional.

   (add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)

You should choose an indentation mode by uncommenting (remove the ";;") at the start of one of the lines. Note that the three indentation modules are mutually exclusive - add at most one. Note that the line of code for simple indentation is commented out (using a preceding ;) in preference for the more advanced indentation module.

   ;;(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
   (add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
   ;;(add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent)

Installation is now complete!


Next: Keybindings and simple usage