
On Sat, Apr 14, 2007 at 09:52:33AM -0700, David Roundy wrote:
Argh. I Am Less Of A Cabal Expert, but it seems like the whole point of using cabal at all is to do our build scripting in Haskell. (see below) ... Couldn't this be done in Haskell? It'd be a real shame if cabal doesn't have sufficient hooks to allow something like this to be written, and it seems like one ought to be able to write nice Haskell functions to do all the interesting autoconfish things.
(And no, I don't mean to be a pain...)
The whole Setup.hs thing, including hooks, is considered by the Cabal devs to have been a mistake. Cabal is a deliberately minimalist system, it is not intended to replace autoconf in the extremely tricky business of finding C libraries. OTOH, cabal handles the tricky business of building Haskell programs in a simple and extensible way. So they complement each other, and you're just asking for pain if you try to have one subsume the other. The Intended Way Forward is that people should never use hooks, instead the .cabal file should handle all Haskell issues and ./configure should handle C issues. This obviously will not work for all programs (though I suspect it would work for darcs). Programs it doesn't work for should use something different, not complicate Cabal. Stefan