Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Emacs mode for Haskell
Emacs Lisp Other
Failed to load latest commit information.
examples Clean up examples directory
snippets Another attempt at removing EOF newline.
tests Add tests/haskell-indentation-tests.el
.gitignore Add support for embedding git version in texinfo manual
.travis.yml Update emacs-snapshot source to ppa:ubuntu-elisp/ppa.
CONTRIBUTING.md Add CONTRIBUTING.md file
Makefile MELPA compatible version info.
NEWS Write NEWS for 13.12 release.
README.md Autofill too long line.
check.sh Add module import checking script
gen-graph.sh Large re-organization to remove cyclic module dependency graph #381
ghc-core.el Add missing autoload cookies
ghci-script-mode.el Add missing autoload cookies
haskell-align-imports.el Update all unicode counterparts
haskell-bot.el Fix incorrect comment.
haskell-cabal.el Define haskell-cabal-mode-map only once.
haskell-checkers.el Use setq instead of setf.
haskell-collapse.el Use syntax-ppss to detect when in a string or comment
haskell-commands.el Fix type insert when point not at identifier start
haskell-compat.el Upgrade to outline-(show|hide)-levels.
haskell-compile.el Use && instead of ; because this works on Windows, too (refs #232)
haskell-complete-module.el Accept anything on RET when there's no match in module completion
haskell-customize.el Merge pull request #433 from ikirill/haskell-doc-interaction
haskell-debug.el Add trace function
haskell-decl-scan.el Remove unnecessary byte-compile-warnings file local variables.
haskell-doc.el Improve comment about haskell-doc.
haskell-font-lock.el Remove outdated commentary.
haskell-indent.el Properly set and kill vars in indent modes.
haskell-indentation.el Use debounced delayed show overlay.
haskell-interactive-mode.el Merge pull request #433 from ikirill/haskell-doc-interaction
haskell-load.el Support running cabal commands w/o running process
haskell-menu.el Fix keymap in haskell-menu
haskell-mode-pkg.el MELPA compatible version info.
haskell-mode.el Direct users to smerge-mode for conflict markers.
haskell-mode.texi MELPA compatible version info.
haskell-modules.el Remove all mentions of cabal-dev.
haskell-move-nested.el Fix indentation in all .el files
haskell-navigate-imports.el Make navigate-imports a bit more useful in absense of import list
haskell-package.el Remove all mentions of cabal-dev.
haskell-presentation-mode.el Fix buffer popping in presentation mode
haskell-process.el let error say how to get complete support (#460)
haskell-repl.el Explicitly require cl-lib wherever it's used.
haskell-sandbox.el Import completion mapping and sandboxes
haskell-session.el Use string-prefix-p instead of haskell-is-prefix-of.
haskell-show.el Clean up haskell-string.el utiliy module.
haskell-simple-indent.el Properly set and kill vars in indent modes.
haskell-sort-imports.el Move docstrings to before interactive decls.
haskell-string.el Clean up haskell-string.el utiliy module.
haskell-unicode-input-method.el Fix indentation in all .el files
haskell-utils.el Allow _ (underscore) in module names.
haskell-yas.el Don't use buffer-file-name when locating yasnippets dir
haskell.el Prompt to reconfigure when Cabal demands it
highlight-uses-mode.el Implement simple buffer-local name refactoring
inf-haskell.el Add xref-(push|pop)-marker support for Emacs25.
logo.svg Use notifications.el rather than notify.el (as it ships with Emacs)
w3m-haddock.el Fix w3m-haddock in the case of no local files

README.md

Haskell Mode for Emacs

Build Status Melpa Status Melpa Stable Status

This is the Haskell mode package for Emacs.

Please see the online haskell-mode manual for setup and use guide.

To report problems or suggestions, please open an issue in the issue tracker.

Below is a brief setup guide.

Quick Emacs rundown

When Emacs is started up, it normally loads the Emacs initialization file usually called ~/.emacs, ~/.emacs.el, or ~/.emacs.d/init.el; with ~ standing for for your home directory. This file should contain all of your personal customisations written as a series of Emacs Lisp commands. In the following sections, this file will simply be referred to as the .emacs file.

Installation

GNU Emacs version 23 or later is officially supported. It may work with other Emacsen, but we don't have the resources to support other versions.

There are many ways to install haskell-mode. The following sections describe the most common ones; pick the one that you're most comfortable with.

package.el-based Installation

This is the recommended way

package.el is the new built-in package manager included in Emacs 24.x. On Emacs 23.x you will need to download package.el yourself and place package.el somewhere in your load-path.

Marmalade

Stable releases of haskell-mode are available on Marmalade.

If you're not already using Marmalade, add the following snippet to your .emacs and evaluate it with M-x eval-buffer:

(require 'package)
(add-to-list 'package-archives
             '("marmalade" . "http://marmalade-repo.org/packages/"))
(package-initialize)

Refresh the package index by M-x package-refresh-contents and install haskell-mode via M-x package-install [RET] haskell-mode.

Alternatively, you can also download the .tar file via the Download link at http://marmalade-repo.org/packages/haskell-mode and install the package .tar-file via M-x package-install-file

Note that in this case you will also need to have a sufficiently recent version of cl-lib.el, upon which haskell-mode depends. This is bundled with Emacs 24.3 and later, and a backported version for use with older Emacs versions can be obtained from GNU ELPA.

MELPA

Development snapshots can be installed via the MELPA community maintained repository.

For MELPA the code you need to add is:

(require 'package)
(add-to-list 'package-archives
             '("melpa" . "http://melpa.org/packages/") t)
(package-initialize)

Refresh the package index by M-x package-refresh-contents and install haskell-mode via M-x package-install [RET] haskell-mode.

el-get based Installation

el-get is another popular package manager for Emacs. If you're an el-get user just do M-x el-get-install to get haskell-mode installed.

Emacs Prelude

haskell-mode is bundled with Emacs Prelude. If you're a Prelude user you can start using it right away.

Debian

If you are using Debian, you can install an older version (e.g. Wheezy ships with version 2.8.0) of haskell-mode with a command like:

$ apt-get install haskell-mode

Installation from Git

This installation method requires more work and recommended for haskell-mode developers/contributors only as it allows to load haskell-mode directly from the checked out Git working copy. If you just want to use bleeding edge versions of haskell-mode please use the MELPA installation method described above.

  • git clone https://github.com/haskell/haskell-mode.git into a suitable directory, e.g. ~/lib/emacs/haskell-mode/ where ~ 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 generate the autoloads file (haskell-mode-autoloads.el) by either

    • Invoking make haskell-mode-autoloads.el, or make all (use this to perform byte-compilation and Info manual generation)

    • From inside Emacs, M-x update-directory-autoloads and answering the question for the folder with ~/lib/emacs/haskell-mode/ and the question for the output-file with ~/lib/emacs/haskell-mode/haskell-mode-autoloads.el

    and then adding the following command to your .emacs:

    (add-to-list 'load-path "~/lib/emacs/haskell-mode/")
    (require 'haskell-mode-autoloads)
    (add-to-list 'Info-default-directory-list "~/lib/emacs/haskell-mode/")
  • After updating your haskell-mode working directory, you need to re-run make all or M-x update-directory-autoloads.

Basic Configuration

For setup instructions, please consult the new integrated haskell-mode Info manual which can be accessed after installation via M-x info-display-manual [RET] haskell-mode. Alternatively, you can also direct your browser to the the online haskell-mode manual for setup and use guide.

Support

Contributing

For submitting pull requests, please see the wiki page on contributing. You don't have to follow this guide, but please make sure your pull requests are at least properly rebased and up to date.

Something went wrong with that request. Please try again.