
Hi all, I have a Cabal project that has library, executable and several test parts. I'd like to be able to load one of the test parts into GHCi using `cabal repl`. However, I'm having some problems: (To be more specific, I have these parts in my Cabal file: - library - executable myapp - test-suite test - test-suite doctests) - `cabal repl test` tries to load test suite into GHCi but it doesn't ask me which test suite I want to load. For example, in my Cabal file I have `test-suite test` and `test-suite doctests`. `cabal test doctests` runs only doctests but I can't use similar command for repl, like `cabal repl doctests`. - `cabal repl test` tries to load the library, but using wrong set of dependencies. It uses `build-depends` field of `test-suite test` but it loads `library` sources. Note that `hs-source-dirs` field of `test-suite test` and `library` are different, and I have my library in `test-suite test` as a dependency. So the problem is that it tries to load `library` part using the source, instead of compiled lib. Any ideas about those? (Note: `cabal test`, `cabal install`, `cabal run` etc. work fine, my Cabal file is working) Thanks.

Hi,
Any ideas about those?
If your main objective is to use the package database from a sandbox, you may find `cabal exec` in combination with a project specific .ghci file a more viable option. Here is an example: $ echo :set -isrc -itest > .ghci $ chmod go-w .ghci $ cabal exec ghci test/Spec.hs Cheers, Simon
participants (2)
-
Simon Hengel
-
Ömer Sinan Ağacan