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

Vasili I. Galchin vigalchin at gmail.com
Sat Jun 6 23:54:40 EDT 2009


Hi David,

     I commented out "Hs-source-dirs"

Executable         QNameTest
--   Hs-source-dirs: Swish/
   Main-Is:        HaskellUtils/QNameTest.hs
   Other-Modules:  HaskellUtils.QName

Here is what I got:

vigalchin at ubuntu:~/FTP/Haskell/Swish-0.2.1$ cabal build -v
Warning: swish.cabal: A package using section syntax should require
"Cabal-Version: >= 1.2" or equivalent.
Creating dist/build (and its parents)
Creating dist/build/autogen (and its parents)
Preprocessing library swish-0.2.1...
Preprocessing executables for swish-0.2.1...
cabal: can't find source for HaskellUtils.QName in ., dist/build/autogen
vigalchin at ubuntu:~/FTP/Haskell/Swish-0.2.1$

I seem to remember that on the Haskell Wiki there is an example of
building/linking an "Executable" but I cannot find. ??

Regards,

Vasili




On Sat, Jun 6, 2009 at 7:22 PM, David Menendez <dave at zednenem.com> wrote:

> 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/ <http://www.eyrie.org/%7Ezednenem/>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090606/d29336a5/attachment.html


More information about the Haskell-Cafe mailing list