3

I use cabal-dev for my project. I want to use hdevtools with it. But hdevtools uses my cabal packages instead of cabal-dev packages. I want to use hdevtools options to make it use the cabal-dev packages. However I cannot figure out which options to use.

I know that in general, I will need to pass to hdevtools the same GHC options that I would pass to GHCi.

So, alternatively the question is what options should I pass to ghci to make it behave like the "cabal-dev ghci" command. I know those are the options I need to pass to hdevtools too.

  • 4
    FYI cabal-dev is now deprecated in favor of cabal sandboxes, https://github.com/creswick/cabal-dev/issues/110. – John L Dec 05 '13 at 06:44
  • `hdevtools` should tell GHC to use the appropriate package DB (with the `--package-db` option). So look at how it invokes GHC and whether there's a way to customise the GHC invocation. – Mikhail Glushenkov Dec 05 '13 at 15:49

1 Answers1

0

You just need to tell hdevtools which package database to use. In my case it looks like this - with cabal-dev it will be a different subfolder in your project but the same idea:

I just add these two options:

-g-no-user-package-conf -g-package-conf.hsenv/ghc_pkg_db
Jeremy
  • 1,198
  • 1
  • 9
  • 16