Skip to content

Commit cc1577a

Browse files
committed
Update README
Also improves markup and removes/fixes redundant/obsolete parts [skip ci]
1 parent 53598f8 commit cc1577a

File tree

1 file changed

+16
-42
lines changed

1 file changed

+16
-42
lines changed

README.md

Lines changed: 16 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,21 @@
11
# Haddock, a Haskell Documentation Tool [![Build Status](https://travis-ci.org/haskell/haddock.svg?branch=master)](https://travis-ci.org/haskell/haddock)
22

33

4-
#### About haddock
4+
## About haddock
55

6-
This is Haddock, a tool for automatically generating documentation
7-
from annotated Haskell source code. It is primary intended for
8-
documenting library interfaces, but it should be useful for any kind
9-
of Haskell code.
6+
See [Description on Hackage](https://hackage.haskell.org/package/haddock).
107

11-
Haddock lets you write documentation annotations next to the
12-
definitions of functions and types in the source code, in a syntax
13-
that is easy on the eye when writing the source code (no heavyweight
14-
mark-up). The documentation generated by Haddock is fully hyperlinked
15-
- click on a type name in a type signature to go straight to the
16-
definition, and documentation, for that type.
8+
## Source code documentation
179

18-
Haddock understands Haskell's module system, so you can structure your
19-
code however you like without worrying that internal structure will be
20-
exposed in the generated documentation. For example, it is common to
21-
implement a library in several modules, but define the external API by
22-
having a single module which re-exports parts of these implementation
23-
modules. Using Haddock, you can still write documentation annotations
24-
next to the actual definitions of the functions and types in the
25-
library, but the documentation annotations from the implementation
26-
will be propagated to the external API when the documentation is
27-
generated. Abstract types and classes are handled correctly. In
28-
fact, even without any documentation annotations, Haddock can generate
29-
useful documentation from your source code.
30-
31-
32-
#### Documentation formats
33-
34-
Haddock can generate documentation in multiple formats; currently HTML
35-
is implemented, and there is partial support for generating LaTeX and
36-
Hoogle.
37-
38-
39-
#### Source code documentation
40-
41-
Full documentation can be found in the doc/ subdirectory, in DocBook
10+
Full documentation can be found in the `doc/` subdirectory, in
11+
[reStructedText format](http://www.sphinx-doc.org/en/stable/rest.html)
4212
format.
4313

44-
45-
#### Contributing
14+
## Contributing
4615

4716
Please create issues when you have any problems and pull requests if you have some code.
4817

49-
##### Hacking
18+
## Hacking
5019

5120
To get started you'll need a latest GHC release installed.
5221

@@ -59,15 +28,15 @@ Clone the repository:
5928

6029
and then proceed using your favourite build tool.
6130

62-
###### Using [`cabal new-build`](http://cabal.readthedocs.io/en/latest/nix-local-build-overview.html)
31+
#### Using [`cabal new-build`](http://cabal.readthedocs.io/en/latest/nix-local-build-overview.html)
6332

6433
```bash
6534
cabal new-build -w ghc-8.2.1
6635
# build & run the test suite
6736
cabal new-test -w ghc-8.2.1
6837
```
6938

70-
###### Using Cabal sandboxes
39+
#### Using Cabal sandboxes
7140

7241
```bash
7342
cabal sandbox init
@@ -83,7 +52,7 @@ export HADDOCK_PATH="dist/build/haddock/haddock"
8352
cabal test
8453
```
8554

86-
###### Using Stack
55+
#### Using Stack
8756

8857
```bash
8958
stack init
@@ -93,9 +62,14 @@ export HADDOCK_PATH="$HOME/.local/bin/haddock"
9362
stack test
9463
```
9564

65+
### Git Branches
9666

9767
If you're a GHC developer and want to update Haddock to work with your
98-
changes, you should be working on `ghc-head` branch instead of master.
68+
changes, you should be working on `ghc-head` branch instead of `master`.
9969
See instructions at
10070
https://ghc.haskell.org/trac/ghc/wiki/WorkingConventions/Git/Submodules
10171
for an example workflow.
72+
73+
The `master` branch usually requires a GHC from the latest GHC stable
74+
branch. The required GHC version can be inferred from the version
75+
bounds on `ghc` in the respective `.cabal` files.

0 commit comments

Comments
 (0)