Module names vs file path in Setup.description

Isaac Jones ijones at
Mon Aug 9 14:21:45 EDT 2004

Krasimir Angelov <ka2_mail at> writes:

>     Thinking about package description I wonder why
> the "modules" field in Setup.description is defines as
> a set of module names, while "main-is" is defines as
> file path. 

Main-is must be a filepath because the module name is likely to be
"Main" and the path is not derivable from the module name.

The "modules" field is module names because the system is kinda smart
about finding the modules, and I hope to make it smarter.  Right now,
it looks for .hs and .lhs files, in the future, it'll look for
Module.happy (or whatever happy's suffix is) and maybe Module.hscpp.
The point is that it'll look for the files and know what kind of
preprocessing is necessary just by the module names. If I recall, this
is what hmake does, and I like the behavior.

In the future, I hope to deprecate the "modules" field for the
"Simple" tools and it'll just chase down dependencies from
Exposed-Modules and Main-is.

> The "c-sources" also uses list of file paths. When using the module
> names it is easier to determine the file names. Maybe it's better to
> use module names only for "exposed-modules" field. I also propose to
> rename "modules" to "hs-sources".

So in the future, like I said, I want to deprecate "modules" a bit,
but then again, I want a new field for random files to include in the
sdist, like documentation.



More information about the Libraries mailing list