From 2788a03a7a346f77df18532b4e51132abe72d40a Mon Sep 17 00:00:00 2001 From: Robert Date: Mon, 16 Mar 2020 21:58:48 +0100 Subject: [PATCH] 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 --- README.md | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ed88b77..f4c6fb6 100644 --- a/README.md +++ b/README.md @@ -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