Cabal "addressibility" problem

Hello, The following is a fragment in my cabal file: Executable GraphPartitionTest Main-Is: Swish.HaskellRDF.GraphPartitionTest.hs Other-modules: Swish.HaskellRDF.GraphPartition Swish.HaskellRDF.GraphClass Swish.HaskellUtils.ListHelpers Swish.HaskellUtils.TestHelpers When I try to do a build I get: Setup: can't find source for Swish in . Cabal/Setup seem to be looking in the current directory for source but as you can see I gave "full" paths, i.e. Swish.HaskellRDF* or Swish.HaskellUtils*. What I doing wrong? Regards, Vasili

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On Fri, Jun 5, 2009 at 3:33 PM, Vasili I. Galchin wrote:
Hello,
The following is a fragment in my cabal file:
Executable GraphPartitionTest Main-Is: Swish.HaskellRDF.GraphPartitionTest.hs Other-modules: Swish.HaskellRDF.GraphPartition Swish.HaskellRDF.GraphClass Swish.HaskellUtils.ListHelpers Swish.HaskellUtils.TestHelpers
When I try to do a build I get:
Setup: can't find source for Swish in .
Cabal/Setup seem to be looking in the current directory for source but as you can see I gave "full" paths, i.e. Swish.HaskellRDF* or Swish.HaskellUtils*.
What I doing wrong?
Regards,
Vasili
You need to give more detail. For example, is your directory layout like './src/Swish/HaskellRDF.../foo.hs'? In that case, Cabal is looking for './Swish/HaskellRDF.../foo.hs'. You need to tell it to look in src/ and not ./ with a line like 'hs-source-dirs: src/' etc. - -- gwern -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEAREKAAYFAkopdUsACgkQvpDo5Pfl1oLbCgCfWI1MZOyWnsyAkra88S/LC506 7oMAoJhv5hDcc1Ypqq0hLncB2t/1Yuby =ADOt -----END PGP SIGNATURE-----

for directory structure I Swish-0.2.1/Swish/HaskellRDF and
Swish-0.2.1/Swish/HaskellUtils ... there are deeper directories but that
distract from the discussion ... to make things concete:
1) swish.cabal is directly under Swish-0.2.1
2) GraphPartitionTest.hs is under Swish-0.2.1/Swish/HaskellRDF
3) GraphPartitionTest's dependencies are either under HaskellRDF or
HaskellUtils
Hope this helps to make things clearer. I added a "Hs-source-dirs" but that
help.
I did a "ruinhaskell Setup -?" to check on options. I don't see any verbose
mode so that when I do "runhaskell Setup build" I can moniitor the progress
of my build for diagnostic purposes! Is there a verbose mode?
Thanks,
Vasili
On Fri, Jun 5, 2009 at 2:43 PM, Gwern Branwen
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
On Fri, Jun 5, 2009 at 3:33 PM, Vasili I. Galchin wrote:
Hello,
The following is a fragment in my cabal file:
Executable GraphPartitionTest Main-Is: Swish.HaskellRDF.GraphPartitionTest.hs Other-modules: Swish.HaskellRDF.GraphPartition Swish.HaskellRDF.GraphClass Swish.HaskellUtils.ListHelpers Swish.HaskellUtils.TestHelpers
When I try to do a build I get:
Setup: can't find source for Swish in .
Cabal/Setup seem to be looking in the current directory for source but as you can see I gave "full" paths, i.e. Swish.HaskellRDF* or Swish.HaskellUtils*.
What I doing wrong?
Regards,
Vasili
You need to give more detail.
For example, is your directory layout like './src/Swish/HaskellRDF.../foo.hs'? In that case, Cabal is looking for './Swish/HaskellRDF.../foo.hs'. You need to tell it to look in src/ and not ./ with a line like 'hs-source-dirs: src/' etc.
- -- gwern -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux)
iEYEAREKAAYFAkopdUsACgkQvpDo5Pfl1oLbCgCfWI1MZOyWnsyAkra88S/LC506 7oMAoJhv5hDcc1Ypqq0hLncB2t/1Yuby =ADOt -----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On Fri, Jun 5, 2009 at 4:10 PM, Vasili I. Galchin wrote:
for directory structure I Swish-0.2.1/Swish/HaskellRDF and Swish-0.2.1/Swish/HaskellUtils ... there are deeper directories but that distract from the discussion ... to make things concete:
1) swish.cabal is directly under Swish-0.2.1
2) GraphPartitionTest.hs is under Swish-0.2.1/Swish/HaskellRDF
3) GraphPartitionTest's dependencies are either under HaskellRDF or HaskellUtils
Hope this helps to make things clearer. I added a "Hs-source-dirs" but that help.
I did a "ruinhaskell Setup -?" to check on options. I don't see any verbose mode so that when I do "runhaskell Setup build" I can moniitor the progress of my build for diagnostic purposes! Is there a verbose mode?
Thanks,
Vasili [04:27 PM] 0Mb$ build --help Usage: Setup build [FLAGS]
Flags for build: -h --help Show this help text -v --verbose[=n] Control verbosity (n is 0--3, default verbosity level is 1) --builddir=DIR The directory where Cabal puts generated build files (default dist) --with-PROG=PATH give the path to PROG --PROG-options=OPTS give extra options to PROG --PROG-option=OPT give an extra option to PROG (no need to quote options containing spaces) - -- gwern -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEAREKAAYFAkopf/sACgkQvpDo5Pfl1oIZfgCeInjWOqdxejdpsBaI62YHkSHu BvIAn1ZsC9rCYmluCW2UCmFGVFcAw3bh =S6In -----END PGP SIGNATURE-----

At work I am using Windose ... so I use "runhaskell .. I don't have "build"
....
Vasili
On Fri, Jun 5, 2009 at 3:28 PM, Gwern Branwen
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
for directory structure I Swish-0.2.1/Swish/HaskellRDF and Swish-0.2.1/Swish/HaskellUtils ... there are deeper directories but that distract from the discussion ... to make things concete:
1) swish.cabal is directly under Swish-0.2.1
2) GraphPartitionTest.hs is under Swish-0.2.1/Swish/HaskellRDF
3) GraphPartitionTest's dependencies are either under HaskellRDF or HaskellUtils
Hope this helps to make things clearer. I added a "Hs-source-dirs" but
help.
I did a "ruinhaskell Setup -?" to check on options. I don't see any verbose mode so that when I do "runhaskell Setup build" I can moniitor the
On Fri, Jun 5, 2009 at 4:10 PM, Vasili I. Galchin wrote: that progress
of my build for diagnostic purposes! Is there a verbose mode?
Thanks,
Vasili [04:27 PM] 0Mb$ build --help Usage: Setup build [FLAGS]
Flags for build: -h --help Show this help text -v --verbose[=n] Control verbosity (n is 0--3, default verbosity level is 1) --builddir=DIR The directory where Cabal puts generated build files (default dist) --with-PROG=PATH give the path to PROG --PROG-options=OPTS give extra options to PROG --PROG-option=OPT give an extra option to PROG (no need to quote options containing spaces)
- -- gwern -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux)
iEYEAREKAAYFAkopf/sACgkQvpDo5Pfl1oIZfgCeInjWOqdxejdpsBaI62YHkSHu BvIAn1ZsC9rCYmluCW2UCmFGVFcAw3bh =S6In -----END PGP SIGNATURE-----

getting farther .....
Executable GraphPartitionTest
Hs-source-dirs: Swish/ << added this
Main-Is: HaskellRDF/GraphPartitionTest.hs <<< changed to a real
filesystem path
Other-modules: HaskellRDF.GraphPartition
HaskellRDF.GraphClass
HaskellUtils.ListHelpers
HaskellUtils.TestHelpers <<< now says "can't find
module 'Swish.HaskellUtils.TestHelpers'"???
Vasili
On Fri, Jun 5, 2009 at 3:28 PM, Gwern Branwen
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
for directory structure I Swish-0.2.1/Swish/HaskellRDF and Swish-0.2.1/Swish/HaskellUtils ... there are deeper directories but that distract from the discussion ... to make things concete:
1) swish.cabal is directly under Swish-0.2.1
2) GraphPartitionTest.hs is under Swish-0.2.1/Swish/HaskellRDF
3) GraphPartitionTest's dependencies are either under HaskellRDF or HaskellUtils
Hope this helps to make things clearer. I added a "Hs-source-dirs" but
help.
I did a "ruinhaskell Setup -?" to check on options. I don't see any verbose mode so that when I do "runhaskell Setup build" I can moniitor the
On Fri, Jun 5, 2009 at 4:10 PM, Vasili I. Galchin wrote: that progress
of my build for diagnostic purposes! Is there a verbose mode?
Thanks,
Vasili [04:27 PM] 0Mb$ build --help Usage: Setup build [FLAGS]
Flags for build: -h --help Show this help text -v --verbose[=n] Control verbosity (n is 0--3, default verbosity level is 1) --builddir=DIR The directory where Cabal puts generated build files (default dist) --with-PROG=PATH give the path to PROG --PROG-options=OPTS give extra options to PROG --PROG-option=OPT give an extra option to PROG (no need to quote options containing spaces)
- -- gwern -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux)
iEYEAREKAAYFAkopf/sACgkQvpDo5Pfl1oIZfgCeInjWOqdxejdpsBaI62YHkSHu BvIAn1ZsC9rCYmluCW2UCmFGVFcAw3bh =S6In -----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On Fri, Jun 5, 2009 at 4:49 PM, Vasili I. Galchin wrote:
getting farther .....
Executable GraphPartitionTest Hs-source-dirs: Swish/ Main-Is: HaskellRDF/GraphPartitionTest.hs filesystem path
Right. You understand why it has to be a filepath and not a module name? Because the module name of an executable would be 'Main', not HaskellRDF.GraphPartitionTest. You can try compiling something like module Foo (main) where main = print "hello world" and see for yourself how it fails.
Other-modules: HaskellRDF.GraphPartition HaskellRDF.GraphClass HaskellUtils.ListHelpers HaskellUtils.TestHelpers module 'Swish.HaskellUtils.TestHelpers'"???
Vasili
Right. hs-source-dirs defined all the module paths as relative to Swish/; I think the solution here would be to have something like 'hs-source-dirs: ., Swish/' (or whatever the directory was that the HaskellUtils stuff can be found in if not ./). - -- gwern -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEAREKAAYFAkophlwACgkQvpDo5Pfl1oJkBgCeLBI6CsOOdt4EzJa1CaYzoMd4 aDAAn3HICqcDAR74J7z4v8xkakVJ6bDl =hgRy -----END PGP SIGNATURE-----

If your module statements say Swish in them, e.g. module Swish.HaskellUtils.TestHelpers where .... then you should probably have no hs-source-dirs (or hs-source-dirs: .) and then use Swish.HaskellUtils.TestHelpers. But leave Main-Is: as you have it. -Ross On Jun 5, 2009, at 4:49 PM, Vasili I. Galchin wrote:
getting farther .....
Executable GraphPartitionTest Hs-source-dirs: Swish/ << added this Main-Is: HaskellRDF/GraphPartitionTest.hs <<< changed to a real filesystem path Other-modules: HaskellRDF.GraphPartition HaskellRDF.GraphClass HaskellUtils.ListHelpers HaskellUtils.TestHelpers <<< now says "can't find module 'Swish.HaskellUtils.TestHelpers'"???
Vasili
On Fri, Jun 5, 2009 at 3:28 PM, Gwern Branwen
wrote: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 for directory structure I Swish-0.2.1/Swish/HaskellRDF and Swish-0.2.1/Swish/HaskellUtils ... there are deeper directories but that distract from the discussion ... to make things concete:
1) swish.cabal is directly under Swish-0.2.1
2) GraphPartitionTest.hs is under Swish-0.2.1/Swish/HaskellRDF
3) GraphPartitionTest's dependencies are either under HaskellRDF or HaskellUtils
Hope this helps to make things clearer. I added a "Hs-source-dirs" but that help.
I did a "ruinhaskell Setup -?" to check on options. I don't see any verbose mode so that when I do "runhaskell Setup build" I can moniitor the
On Fri, Jun 5, 2009 at 4:10 PM, Vasili I. Galchin wrote: progress
of my build for diagnostic purposes! Is there a verbose mode?
Thanks,
Vasili [04:27 PM] 0Mb$ build --help Usage: Setup build [FLAGS]
Flags for build: -h --help Show this help text -v --verbose[=n] Control verbosity (n is 0--3, default verbosity level is 1) --builddir=DIR The directory where Cabal puts generated build files (default dist) --with-PROG=PATH give the path to PROG --PROG-options=OPTS give extra options to PROG --PROG-option=OPT give an extra option to PROG (no need to quote options containing spaces)
- -- gwern -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux)
iEYEAREKAAYFAkopf/sACgkQvpDo5Pfl1oIZfgCeInjWOqdxejdpsBaI62YHkSHu BvIAn1ZsC9rCYmluCW2UCmFGVFcAw3bh =S6In -----END PGP SIGNATURE-----
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

"Vasili I. Galchin"
Executable GraphPartitionTest Main-Is: Swish.HaskellRDF.GraphPartitionTest.hs Other-modules: Swish.HaskellRDF.GraphPartition Swish.HaskellRDF.GraphClass Swish.HaskellUtils.ListHelpers Swish.HaskellUtils.TestHelpers
The "Main-Is:" line is wrong: it should be:
Main-Is: Swish/HaskellRDF/GraphPartitionTest.hs
That is, it should name a filepath (usings slashes), not a module (using dots). Regards, Malcolm
participants (4)
-
Gwern Branwen
-
Malcolm Wallace
-
Ross Mellgren
-
Vasili I. Galchin