0
votes

I'm try to add some test to a little project in Haskell. (I'm using a cabal sandbox on Mac OS)

Everything is fine (the Haskell code compile and run perfectly in cabal repl. But when I try to build the test, it compiles fine, but crashes at link time, claiming that it can't find some symbols which are from my package.

It seems that it's not trying to link with my own module library, even though I added the dependency in the cabal test suite configuration. If I didn't it could compile, did It ?

So is it a (cabal ) configuration problem or something more major ?

1
It is hard to say without actual code, but I guess you forgot to add module to cabal file. - Yuras

1 Answers

2
votes

I assume you Cabal file has a library, executable, test-suite layout. Then you must list the relevant modules in the library section of your Cabal file under exposed-modules or other-modules. In any case, all the modules of your package must be listed in the Cabal file.