[Haskell-cafe] SoC / Cabal project proposal: specify Setup.hs dependencies

Rogan Creswick creswick at gmail.com
Tue Mar 29 19:26:22 CEST 2011

I've been wanting to share code between cabal projects for some time,
and I finally had a chance to write up the rough idea as a simple
proposal.  Here's the description, with links to the SoC trac and
reddit haskell_proposals pages.

SoC ticket:


Non-standard builds often need to implement specific build steps in
Setup.hs, specifying a build-type: Custom in the project cabal file.
The user hook system works reasonably well for modifying or replacing
the specific sub steps of a build, but *implementing* anything more
than the simplest logic in Setup.hs is very difficult.

A great deal of this difficulty stems from the lack of library support
for code in Setup.hs. Adding a cabal section that specifies a
build-depends: for Custom (and possibly other) build types would allow
developers to reuse build code between projects, to share build system
modifications on hackage more easily, and to prototype new additions
to cabal.

Setup.hs *can* allow arbitrarily complex build system manipulations;
however, it is not practical to do so because the infrastructure
surrounding Setup.hs doesn't promote code reuse. The addition of
dependencies that cabal-install would install prior to building
setup.hs and issuing the build would enable developers to produce
custom builds that perform complex operations that utilize the
high-quality libraries available on hackage. Furthermore, this would
provide the means to prototype (and distribute) new cabal /
cabal-install features before integrating experimental code into the
stable tools.

I'm interested in thoughts / feedback about the idea, as well as
hearing from anyone interested in pursuing this as a summer of code
project :)


More information about the Haskell-Cafe mailing list