
On 23 November 2004 09:04, Krasimir Angelov wrote:
I am strongly advocating to have one to one correspondence between Cabal packages and Haskell packages. It would be even simpler if in each Cabal package we have only one library or only one executable. I like the Simon's proposal of shipments. If we need a package with one library and multiple executables we can use shipment too. Currently we have Setup.description for each package. I propose to change the name to Package.description and to introduce Shipment.description file. The latter will contain the name of shipment and the list of Package.description files in it. The Cabal package should export defaultMain and defaultShipmentMain functions, where the former builds a single package while the latter builds a shipment.
Sounds good. I like the fact that the existing package description can be simplified. Presumably the Setup.lhs in the shipment works by invoking Setup.lhs from each of the packages, in which case we'll need to expand Cabal with a notion of a local package database. Perhaps: ./setup configure --pkg-db=PATH satisifies dependencies using packages from PATH, layered on top of the global & user packages as normal. ./setup register --pkg-db=PATH registers in the package database at PATH. The default is still to register in the global db, or the user db if --user is given. We need this to support the "directory of packages" idea too (PATH can be either a directory or the name of a file containing the database). Cheers, Simon