[Haskell-cafe] Still having problems building a very simple "Executable" ....

David Menendez dave at zednenem.com
Sat Jun 6 20:22:38 EDT 2009

On Sat, Jun 6, 2009 at 7:45 PM, Vasili I. Galchin <vigalchin at gmail.com> wrote:
> Hello,
>      I picked an exceedingly case to build an "Executable":
> Executable         QNameTest
>    Hs-source-dirs: Swish/
>    Main-Is:        HaskellUtils/QNameTest.hs
>    Other-Modules:  HaskellUtils.QName
> Here are the results of a "cabal build -v":
> Creating dist/build/QNameTest (and its parents)
> Creating dist/build/QNameTest/QNameTest-tmp (and its parents)
> /usr/local/bin/ghc -o dist/build/QNameTest/QNameTest --make
> -hide-all-packages -i -idist/build/QNameTest/QNameTest-tmp -iSwish/
> -idist/build/autogen -Idist/build/QNameTest/QNameTest-tmp -odir
> dist/build/QNameTest/QNameTest-tmp -hidir dist/build/QNameTest/QNameTest-tmp
> -stubdir dist/build/QNameTest/QNameTest-tmp -package HUnit- -package
> array- -package base- -package binary-0.4.2 -package
> bytestring- -package containers- -package mtl- -package
> old-time- -package parallel- -package parsec- -package
> random- -O Swish/HaskellUtils/QNameTest.hs
> Swish/HaskellUtils/QNameTest.hs:36:7:
>     Could not find module `Swish.HaskellUtils.QName':
>       Use -v to see a list of the files searched for.
> ???

I'm guessing QNameTest.hs imports Swish.HaskellUtils.QName, which
means that GHC is looking for a file Swish/HaskellUtils/QName.hs. But
you've indicated that the root of the source tree is a directory
called Swish/, so GHC is looking for

I'd try eliminating the hs-source-dirs field.

Dave Menendez <dave at zednenem.com>

More information about the Haskell-Cafe mailing list