Skip to content

Commit abab271

Browse files
committed
Merge pull request #560 from gracjan/pr-readme
Update instructions in README.md.
2 parents 6013ae4 + fec6e3c commit abab271

File tree

1 file changed

+68
-127
lines changed

1 file changed

+68
-127
lines changed

README.md

Lines changed: 68 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -1,176 +1,117 @@
11
Haskell Mode for Emacs
2-
----------------------
2+
======================
33

44
[![Build Status](https://travis-ci.org/haskell/haskell-mode.svg?branch=master)](https://travis-ci.org/haskell/haskell-mode)
55
[![Melpa Status](http://melpa.org/packages/haskell-mode-badge.svg)](http://melpa.org/#/haskell-mode)
66
[![Melpa Stable Status](http://stable.melpa.org/packages/haskell-mode-badge.svg)](http://stable.melpa.org/#/haskell-mode)
77

8-
This is the Haskell mode package for Emacs.
8+
This is an Emacs mode for editing, debugging, and developing Haskell programs.
99

10-
Please see
11-
[the online haskell-mode manual](https://github.com/haskell/haskell-mode/wiki)
12-
for setup and use guide.
13-
14-
To report problems or suggestions, please
15-
[open an issue](https://github.com/haskell/haskell-mode/issues?state=open)
16-
in the issue tracker.
17-
18-
Below is a brief setup guide.
10+
## Installation
1911

20-
Quick Emacs rundown
21-
--------------------
12+
`haskell-mode` is best installed as a package.
2213

23-
When Emacs is started up, it normally loads the
24-
[Emacs initialization file](http://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html)
25-
usually called `~/.emacs`, `~/.emacs.el`, or `~/.emacs.d/init.el`;
26-
with `~` standing for for your home directory. This file should
27-
contain all of your personal customisations written as a series of
28-
Emacs Lisp commands. In the following sections, this file will simply
29-
be referred to as the `.emacs` file.
14+
To install `haskell-mode` you need to add a package archive repository that distributes
15+
`haskell-mode`. Execute
3016

31-
Installation
32-
------------
17+
```
18+
M-x customize-option RET package-archives
19+
```
3320

34-
GNU Emacs version 23 or later is officially supported. It may work
35-
with other Emacsen, but we don't have the resources to support other
36-
versions.
21+
and add
3722

38-
There are many ways to install `haskell-mode`. The following sections
39-
describe the most common ones; pick the one that you're most
40-
comfortable with.
23+
Archive name: melpa-stable
24+
URL or directory name: http://stable.melpa.org/packages/
4125

42-
### `package.el`-based Installation
26+
Fetch list of packages with
4327

44-
*This is the recommended way*
28+
M-x package-refresh-contents
4529

46-
`package.el` is the new
47-
[built-in package manager](http://www.emacswiki.org/emacs/ELPA#toc4)
48-
included in Emacs 24.x. On Emacs 23.x you will need to download
49-
[`package.el`](http://bit.ly/pkg-el23) yourself and place `package.el`
50-
somewhere in your
51-
[`load-path`](http://www.emacswiki.org/emacs/LoadPath).
30+
and then follow by
5231

53-
#### Marmalade
32+
M-x package-install RET haskell-mode
5433

55-
**Stable releases** of `haskell-mode` are available on
56-
[Marmalade](http://marmalade-repo.org/packages/haskell-mode).
34+
Voila! `haskell-mode` is installed! You should be able to edit Haskell
35+
source code in color now.
5736

58-
If you're not already using Marmalade, add the following snippet to
59-
your `.emacs` and evaluate it with `M-x eval-buffer`:
37+
You need to enable indentation as this does not happen automatically
38+
currently. Add this line to your ~/.emacs file:
6039

6140
```el
62-
(require 'package)
63-
(add-to-list 'package-archives
64-
'("marmalade" . "http://marmalade-repo.org/packages/"))
65-
(package-initialize)
41+
(add-hook 'haskell-mode-hook 'haskell-indentation-mode)
42+
6643
```
6744

68-
Refresh the package index by `M-x package-refresh-contents` and install
69-
`haskell-mode` via `M-x package-install [RET] haskell-mode`.
45+
`Haskell-mode` has much much much more to offer but the above should get you
46+
going!
7047

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

75-
Note that in this case you will also need to have a sufficiently
76-
recent version of `cl-lib.el`, upon which `haskell-mode` depends.
77-
This is bundled with Emacs 24.3 and later, and a backported version
78-
for use with older Emacs versions can be obtained from
79-
[GNU ELPA](http://elpa.gnu.org/packages/cl-lib.html).
49+
## Advanced configuration
8050

81-
#### MELPA
51+
For setup instructions, please consult the integrated `haskell-mode`
52+
[Info](https://www.gnu.org/software/texinfo/manual/info/info.html)
53+
manual which can be accessed after installation via `M-x
54+
info-display-manual [RET] haskell-mode`. Alternatively, you can also
55+
direct your browser to the
56+
[the online haskell-mode manual](https://github.com/haskell/haskell-mode/wiki)
57+
for setup and user guide.
8258

83-
**Development snapshots** can be installed via the
84-
[MELPA](http://melpa.org) community maintained repository.
8559

86-
For MELPA the code you need to add is:
60+
## Installation - more information
8761

88-
```lisp
89-
(require 'package)
90-
(add-to-list 'package-archives
91-
'("melpa" . "http://melpa.org/packages/") t)
92-
(package-initialize)
93-
```
62+
`haskell-mode` supports GNU Emacs versions 23, 24 and upcoming 25
63+
(snapshot).
9464

95-
Refresh the package index by `M-x package-refresh-contents` and install
96-
`haskell-mode` via `M-x package-install [RET] haskell-mode`.
65+
`haskell-mode` is available from [melpa-stable](http://http://stable.melpa.org) (releases) and [melpa](http://melpa.org)
66+
(git snapshots).
9767

98-
### el-get based Installation
68+
Other means of obtaining `haskell-mode` include
69+
[el-get](https://github.com/dimitri/el-get),
70+
[Marmalade](http://marmalade-repo.org/packages/haskell-mode),
71+
[Emacs Prelude](https://github.com/bbatsov/prelude) and [Debian package](https://packages.debian.org/search?keywords=haskell-mode).
9972

100-
[el-get](https://github.com/dimitri/el-get) is another popular package manager for Emacs.
101-
If you're an el-get user just do `M-x el-get-install` to get `haskell-mode` installed.
10273

103-
### Emacs Prelude
74+
## Installation from git repository
10475

105-
`haskell-mode` is bundled with
106-
[Emacs Prelude](https://github.com/bbatsov/prelude). If you're a
107-
Prelude user you can start using it right away.
76+
Running `haskell-mode` directly from sources is easy but
77+
requires a little preparation:
10878

109-
### Debian
79+
- `git clone https://github.com/haskell/haskell-mode.git` into a
80+
suitable directory, e.g. `~/lib/emacs/haskell-mode/` where `~`
81+
stands for your home directory.
11082

111-
If you are using Debian, you can install an older version (e.g. Wheezy
112-
ships with version 2.8.0) of `haskell-mode` with a command like:
83+
- Assuming you have unpacked the various haskell-mode modules
84+
(`haskell-mode.el` and the rest) in the directory
85+
`~/lib/emacs/haskell-mode/`, you need to generate various files, the
86+
autoloads file (`haskell-mode-autoloads.el`) is one among
87+
them. Invoke:
11388

11489
```bash
115-
$ apt-get install haskell-mode
90+
make EMACS=/path/to/your/emacs
11691
```
11792

118-
### Installation from Git
119-
120-
*This installation method requires more work and recommended for
121-
haskell-mode developers/contributors only as it allows to load
122-
haskell-mode directly from the checked out Git working copy. If you
123-
just want to use bleeding edge versions of haskell-mode please use
124-
the MELPA installation method described above.*
93+
and then adding the following command to your `.emacs`:
12594

126-
- `git clone https://github.com/haskell/haskell-mode.git` into a
127-
suitable directory, e.g. `~/lib/emacs/haskell-mode/` where `~`
128-
stands for your home directory.
129-
130-
- Assuming you have unpacked the various haskell-mode modules
131-
(`haskell-mode.el` and the rest) in the directory
132-
`~/lib/emacs/haskell-mode/`, you need generate the autoloads file
133-
(`haskell-mode-autoloads.el`) by either
134-
135-
- Invoking `make haskell-mode-autoloads.el`, or `make all` (use
136-
this to perform byte-compilation and Info manual generation)
137-
138-
- From inside Emacs, `M-x update-directory-autoloads` and answering the question for
139-
the folder with `~/lib/emacs/haskell-mode/` and the question for the output-file with
140-
`~/lib/emacs/haskell-mode/haskell-mode-autoloads.el`
141-
142-
and then adding the following command to your `.emacs`:
95+
```el
96+
(add-to-list 'load-path "~/lib/emacs/haskell-mode/")
97+
(require 'haskell-mode-autoloads)
98+
(add-to-list 'Info-default-directory-list "~/lib/emacs/haskell-mode/")
99+
```
143100

144-
```el
145-
(add-to-list 'load-path "~/lib/emacs/haskell-mode/")
146-
(require 'haskell-mode-autoloads)
147-
(add-to-list 'Info-default-directory-list "~/lib/emacs/haskell-mode/")
148-
```
101+
## Contributing
149102

150-
- After updating your haskell-mode working directory, you need to
151-
re-run `make all` or `M-x update-directory-autoloads`.
103+
If you followed the above you are just a couple of steps away from
104+
contributing to `haskell-mode`.
152105

153-
Basic Configuration
154-
-------------------
106+
`haskell-mode` is activelly seeking contributions from users of
107+
`haskell-mode`. For more information have a look at
108+
[the wiki page on contributing](https://github.com/haskell/haskell-mode/wiki/Contributing).
155109

156-
For setup instructions, please consult the new integrated haskell-mode
157-
[Info](https://www.gnu.org/software/texinfo/manual/info/info.html)
158-
manual which can be accessed after installation via
159-
`M-x info-display-manual [RET] haskell-mode`.
160-
Alternatively, you can also direct your browser to the
161-
[the online haskell-mode manual](https://github.com/haskell/haskell-mode/wiki)
162-
for setup and use guide.
163110

164-
Support
165-
-------
111+
## Getting in contact
166112

167113
- [Mailing list](http://projects.haskell.org/cgi-bin/mailman/listinfo/haskellmode-emacs)
168114
- [Github homepage](https://github.com/haskell/haskell-mode)
115+
- IRC: #haskell-emacs on irc.freenode.net
169116

170-
Contributing
171-
------------
172-
173-
For submitting pull requests, please see the wiki
174-
[page on contributing](https://github.com/haskell/haskell-mode/wiki/Contributing). You
175-
don't have to follow this guide, but please make sure your pull
176-
requests are at least properly rebased and up to date.
117+
Have fun!

0 commit comments

Comments
 (0)