[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-1.2.0.0 -package
> array-0.1.0.0 -package base-3.0.1.0 -package binary-0.4.2 -package
> bytestring-0.9.1.0 -package containers-0.1.0.1 -package mtl-1.1.0.1 -package
> old-time-1.0.0.0 -package parallel-1.0.0.0 -package parsec-2.1.0.0 -package
> random-1.0.0.0 -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
Swish/Swish/HaskellUtils/QName.hs.

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

-- 
Dave Menendez <dave at zednenem.com>
<http://www.eyrie.org/~zednenem/>


More information about the Haskell-Cafe mailing list