package description files

Isaac Jones ijones at
Tue Jan 4 14:11:03 EST 2005

"Simon Marlow" <simonmar at> writes:

> On 04 January 2005 15:39, Ross Paterson wrote:
>> On Tue, Jan 04, 2005 at 03:31:44PM -0000, Simon Marlow wrote:
>>> On 04 January 2005 10:36, Ross Paterson wrote:
>>>> I'd like to second Krasimir's suggestion that package description
>>>> files be called Package.description (or package.description), which
>>>> seems obviously more appropriate than Setup.description.  In
>>>> addition, these files will be used by other tools as well as Cabal
>>>> setup scripts.
>>> Actually I'm slightly in favour of <package>.{hspkg,hsproj}.  The
>>> point of a file suffix is to give some useful information about the
>>> contents of the file, and preferably to uniquely identify its format;
>>> .description is just too vague (although I don't know of any other
>>> uses for the .description suffix).
>> Fine, but I meant "package" rather than <package>, 
> And I meant <package> rather than "package" :-)

As Ross pointed out, one problem with that is finding the file itself.
It also sorta violates the "don't repeat yourself" principal of
keeping data in sync.

I suppose one good thing is that we could possibly have several
project files in a single directory, if that ever became an
interesting thing to do for some reason.

- If there is more than one .hsproj in the directory, do we try to
  build them both, or do we exit with an error?

- If the foo.hsproj does not match "name: foo" (case insensitive?) in
  the file itself, we should exit with an error.

- Obviously, if we can't find any .hsproj file, then we exit with an

- Is it possible to create a package name that uses characters that
  are invalid for a filename?

- Should we get rid of case sensitivity in package names?  I've
  noticed that ghc -package Cabal is different from ghc -package
  cabal.  Since some filesystems are case insensitive (including Mac
  OS X, right?) it would probably be best to be consistent about case
  sensitivity across the board.  I guess we could say that package
  names in the files are case insensitive, but otherwise they're not?

Those are all the issues I can think of offhand, and none of them are
too bad.  It would probably be better to have a single file than have
VS create the file with duplicate information.

I'm a bit of a fan of having a simple, fixed filename, for
simplicity's sake, and I'm a bit of a fan of not changing this
interface under the folks who are already using it, but I want to do
the right thing before 1.0.  I'm happy either way, but I don't want to
search for all of Setup.description and foo.hsproj.



More information about the Libraries mailing list