mirror of
https://github.com/ocharles/weeder.git
synced 2024-11-27 02:33:03 +03:00
Document usage with stack (#9)
* Document usage with stack This is how I got it to work, there may well be more sensible options. * Update README.md Co-authored-by: Ollie Charles <ollie@ocharles.org.uk>
This commit is contained in:
parent
7f878a61af
commit
2788a03a7a
23
README.md
23
README.md
@ -18,8 +18,11 @@ code is reachable and which code is dead.
|
|||||||
|
|
||||||
## Preparing Your Code for Weeder
|
## Preparing Your Code for Weeder
|
||||||
|
|
||||||
To use Weeder, you will need to generate `.hie` files from your source code. If
|
To use Weeder, you will need to generate `.hie` files from your source code.
|
||||||
you use Cabal, this is easily done by adding one line to your
|
|
||||||
|
### Cabal
|
||||||
|
|
||||||
|
If you use Cabal, this is easily done by adding one line to your
|
||||||
`cabal.project.local` file:
|
`cabal.project.local` file:
|
||||||
|
|
||||||
``` cabal
|
``` cabal
|
||||||
@ -34,6 +37,22 @@ cabal clean
|
|||||||
cabal build all
|
cabal build all
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Stack
|
||||||
|
|
||||||
|
If you use `stack`, add the following to your `stack.yaml`:
|
||||||
|
|
||||||
|
``` yaml
|
||||||
|
ghc-options:
|
||||||
|
"$locals": -fwrite-ide-info
|
||||||
|
```
|
||||||
|
|
||||||
|
and rebuild:
|
||||||
|
|
||||||
|
``` shell
|
||||||
|
stack clean
|
||||||
|
stack build
|
||||||
|
```
|
||||||
|
|
||||||
## Calling Weeder
|
## Calling Weeder
|
||||||
|
|
||||||
To call Weeder, you first need to provide a configuration file. Weeder uses
|
To call Weeder, you first need to provide a configuration file. Weeder uses
|
||||||
|
Loading…
Reference in New Issue
Block a user