Skip to content

Quick Installation #859

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 10, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 17 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,25 @@ This is an Emacs mode for editing, debugging and developing Haskell programs.
[![Melpa Status](http://melpa.org/packages/haskell-mode-badge.svg)](http://melpa.org/#/haskell-mode)
[![Melpa Stable Status](http://stable.melpa.org/packages/haskell-mode-badge.svg)](http://stable.melpa.org/#/haskell-mode)

## Installation
## Quick Installation

`haskell-mode` is best installed as a package.
Make sure you have this in your [init file](http://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html) (usually `~/.emacs`). If you already have `custom-set-variables`, merge its contents:

To install `haskell-mode` you need to add a package archive repository that distributes
`haskell-mode`. Execute

```
M-x customize-option RET package-archives
```

and add

Archive name: melpa-stable
URL or directory name: http://stable.melpa.org/packages/

Fetch list of packages with
```elisp
(require 'package)
(add-hook 'haskell-mode-hook 'haskell-indentation-mode)
(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:

M-x package-refresh-contents

Expand All @@ -36,14 +38,6 @@ and then follow by
Voila! `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:

```el
(add-hook 'haskell-mode-hook 'haskell-indentation-mode)

```

`Haskell-mode` has much much much more to offer but the above should get you
going!

Expand Down