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:
Robert 2020-03-16 21:58:48 +01:00 committed by GitHub
parent 7f878a61af
commit 2788a03a7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,8 +18,11 @@ code is reachable and which code is dead.
## Preparing Your Code for Weeder
To use Weeder, you will need to generate `.hie` files from your source code. If
you use Cabal, this is easily done by adding one line to your
To use Weeder, you will need to generate `.hie` files from your source code.
### Cabal
If you use Cabal, this is easily done by adding one line to your
`cabal.project.local` file:
``` cabal
@ -34,6 +37,22 @@ cabal clean
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
To call Weeder, you first need to provide a configuration file. Weeder uses