Skip to content

Commit f8aa985

Browse files
committed
Add more info on passing -haddock flag
1 parent 0b73a81 commit f8aa985

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,23 @@ This is *very* early stage software.
5050

5151
![Eval](https://i.imgur.com/bh992sT.gif)
5252

53-
- Type information and documentation on hover. Note that currently, in order for docs to be displayed for dependencies, they must have been built with GHC's `-haddock` flag. This can be achieved in a number of ways, such as `cabal configure --ghc-options=-haddock`.
53+
- Type information and documentation on hover. Note that currently, in order for docs to be displayed for dependencies, they must have been built with GHC's `-haddock` flag:
54+
55+
- For cabal:
56+
- Add to your global config file (e.g. `~/.cabal/config`):
57+
```
58+
program-default-options
59+
ghc-options: -haddock
60+
```
61+
- Or, for a single project, run `cabal configure --ghc-options=-haddock`
62+
63+
- For stack, add to global `$STACK_ROOT\config.yaml`, or project's `stack.yaml`:
64+
```
65+
ghc-options:
66+
"$everything": -haddock
67+
```
68+
69+
This will cause compilation errors if a dependency contains invalid Haddock markup, though in a future version of GHC (hopefully 8.12), [these will be demoted to warnings](https://gitlab.haskell.org/ghc/ghc/-/merge_requests/2377).
5470
5571
- Many more (TBD)
5672

0 commit comments

Comments
 (0)