[Haskell-cafe] Cabal "addressibility" problem

Gwern Branwen gwern0 at gmail.com
Fri Jun 5 16:55:55 EDT 2009


-----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-----


More information about the Haskell-Cafe mailing list