multiple cabal files in one directory?

Peter Simons simons at cryp.to
Wed Jan 12 10:33:26 CET 2011


Hi Henning,

 > The name does not have to be pkgname.cabal. You can choose any name
 > with extension .cabal. Cabal complains about multiple files with that
 > extension.

duh, I didn't know that! I assumed that the "foo" part in "foo.cabal" is
significant in some way, but apparently it's not.


 > So you could in principle call it description.cabal consistently in
 > all your packages.

Is it also possible to use a package-specific name for Setup.hs? If I'd
be writing a package called "foo", could I use the name "foo.cabal" and
"foo.setup" to designate my build instructions? I'd also be happy to
call the "Setup.hs" file "Setup-foo.hs" or "Foo-setup.hs" or whatever,
as long as there's a package-specific component in the name that matches
the one I used for the Cabal file.

If that were the case, then multiple packages could be stored in one
directory, and a build call like

  cabal configure --package=foo

would be unambiguous.

Take care,
Peter




More information about the Libraries mailing list