m (Added infobox.)
(Added section about tags.)
Latest revision as of 18:48, 28 May 2012
ETAGS allows jumping to the definition of names at the point via
M-.. To generate tags (a TAGS file) for a project, you need hasktags.
$ cabal install hasktags
 1.2 Calling directly
M-x haskell-process-generate-tags to generate the TAGS file of the current session directory.
You can now use
M-. on a name in a Haskell buffer which will jump directly to its definition. You can also now use it for autocompletion.
 1.3 On save
Provided you have properly bound
C-x C-s, you just need to enable tags generation on save:
(custom-set-variables '(haskell-tags-on-save t))
(setq haskell-tags-on-save t)
M-x customize-group haskell and it's in there.
 2 Speedbar
Emacs has a SpeedBar which works quite nice together with haskell-mode and also detects syntactic elements such as variables, imports, instances, classes.
(require 'speedbar) (speedbar-add-supported-extension ".hs")
to your .emacs file and fire up speedbar with