Skip to content
This repository was archived by the owner on Aug 3, 2024. It is now read-only.

Commit d843746

Browse files
committed
Add a CONTRIBUTING.md file
1 parent 2b2bf07 commit d843746

File tree

2 files changed

+65
-55
lines changed

2 files changed

+65
-55
lines changed

CONTRIBUTING.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Contributing to Haddock
2+
3+
Thank you for contributing to Haddock! Here is the information you will need in
4+
order to make your contribution
5+
6+
## Reporting issues
7+
8+
Please open a ticket if you get an unexpected behaviour from Haddock!
9+
You should ideally include a [Short, Self Contained, Correct (Compilable), Example][SSCCE]
10+
in your ticket, so that the maintainers may easily reproduce your issue.
11+
12+
## Hacking
13+
14+
To get started you'll need the latest GHC release installed.
15+
16+
Clone the repository:
17+
18+
```bash
19+
git clone https://github.com/haskell/haddock.git
20+
cd haddock
21+
```
22+
23+
### Git Branches
24+
25+
Please **always** base your pull request on the current GHC version branch
26+
(`ghc-9.0` for instance). The PR will be forward-ported to `ghc-head`
27+
so that GHC can use it.
28+
29+
### Building the packages
30+
31+
#### Using `cabal`
32+
33+
Requires cabal `>= 3.4` and GHC `== 9.0`:
34+
35+
```bash
36+
cabal v2-build all --enable-tests
37+
cabal v2-test all
38+
```
39+
40+
#### Using `stack`
41+
42+
```bash
43+
stack init
44+
stack build
45+
export HADDOCK_PATH="$(stack exec which haddock)"
46+
stack test
47+
```
48+
49+
### Updating golden testsuite outputs
50+
51+
If you've changed Haddock's output, you will probably need to accept the new
52+
output of Haddock's golden test suites (`html-test`, `latex-test`,
53+
`hoogle-test`, and `hypsrc-test`). This can be done by passing the `--accept`
54+
argument to these test suites. With a new enough version of `cabal-install`:
55+
56+
```
57+
cabal v2-test html-test latex-test hoogle-test hypsrc-test \
58+
--test-option='--accept'
59+
```
60+
61+
62+
[SSCCE]: http://sscce.org/
63+

README.md

Lines changed: 2 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -21,62 +21,9 @@ This project consists of three packages:
2121

2222
## Contributing
2323

24-
Please create issues when you have any problems and pull requests if you have
25-
some code.
24+
See [CONTRIBUTING.md](CONTRIBUTING.md) to see how to make contributions to the
25+
project.
2626

27-
## Hacking
28-
29-
To get started you'll need the latest GHC release installed.
30-
31-
Clone the repository:
32-
33-
```bash
34-
git clone https://github.com/haskell/haddock.git
35-
cd haddock
36-
```
37-
38-
and then proceed using your favourite build tool.
39-
40-
Note: before building `haddock`, you need to build the subprojects
41-
`haddock-library` and `haddock-api`, in this order!
42-
The `cabal v2-build` takes care of this automatically.
43-
44-
#### Using `cabal`
45-
46-
Requires cabal `>= 3.4` and GHC `== 9.0`:
47-
48-
```bash
49-
cabal build all --enable-tests
50-
cabal test all
51-
```
52-
53-
#### Using `stack`
54-
55-
```bash
56-
stack init
57-
stack build
58-
export HADDOCK_PATH="$(stack exec which haddock)"
59-
stack test
60-
```
61-
62-
### Git Branches
63-
64-
If you're a GHC developer and want to update Haddock to work with your changes,
65-
you should be working on the `ghc-head` branch. See instructions at
66-
<https://gitlab.haskell.org/ghc/ghc/-/wikis/working-conventions/git/submodules>
67-
for an example workflow.
68-
69-
### Updating golden testsuite outputs
70-
71-
If you've changed Haddock's output, you will probably need to accept the new
72-
output of Haddock's golden test suites (`html-test`, `latex-test`,
73-
`hoogle-test`, and `hypsrc-test`). This can be done by passing the `--accept`
74-
argument to these test suites. With a new enough version of `cabal-install`:
75-
76-
```
77-
cabal v2-test html-test latex-test hoogle-test hypsrc-test \
78-
--test-option='--accept'
79-
```
8027

8128
[CI page]: https://travis-ci.org/haskell/haddock
8229
[CI badge]: https://travis-ci.org/haskell/haddock.svg?branch=ghc-8.10

0 commit comments

Comments
 (0)