On Thu, Jul 11, 2013 at 4:55 AM, Kirill Zaborsky <qri...@gmail.com> wrote:
Currently I'm creating a small library and I wanted to create tests for it. So I have a library section in cabal file and also a test-suite section.Everything goes well but when I tried to load file with tests into ghci (actually it was a REPL in emacs) I received errors stating that GHCi can not find e.g. Test.Framework module.
Are you using the ghci command directly, or calling it via 'cabal-dev ghci' ? (the later should work)--Rogan
Is there any way to use multiple build-depends in GHCi?KInd regards,Kirill Zaborsky
_______________________________________________
Haskell-Cafe mailing list
Haskel...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Currently I'm creating a small library and I wanted to create tests for it. So I have a library section in cabal file and also a test-suite section.
Hi Kirill,I'm sorry for the delay in getting back to you. The main problem is based on a misconception about cabal-dev that comes up frequently.You do not need to 'configure' and 'build' with cabal-dev. In fact, you shouldn't do so (unless you /really/ understand the internals, and it's very rare that you actually /need/ to do that).Generally speaking, you only need one command:$ cabal-dev installThat will build all dependencies, configure your project (with flags, if you use the --flags="..." param) and install your library / program into the cabal-dev sandbox. This is important in your situation because cabal-dev configure and cabal-dev build do not install dependencies in a sandbox -- cabal-dev install does that step.What I'm confused by is why the command 'cabal-dev configure --enable-tests' succeeded for you. It looks like there may be a bug in cabal-dev that allows user-package db entries to interfere with configure, but I'm not really sure what's going on.I just tried building and using cabal-dev ghci with your sample project, and it should work fine if you delete your cabal-dev sandbox, and then run:$ cabal-dev install --flags="--enable-tests"...$ cabal-dev ghci--Rogan