
You can also browse the source at: http://code.haskell.org/~nominolo/src/cabal+configs/ / Thomas On 24 jun 2007, at 12.41, Thomas Schilling wrote:
Hi,
you just received a longish patch bundle, that together implement Cabal configurations. I realized too late that there's a way to combine this mail with the actual patch, so consider this an addendum.
The implementation can read all old Cabal-files (and should do the same), but unfortunately, I had to change the interface of the confHook function, which I assume will break some setup files. The documentation states, that you shouldn't depend on that interface, but then again do people have to use them if they have special requirements.
The most important change is, that Cabal files are now parsed to 'PreparedPackageDescription' which requires a run of 'finalizePackageDescription' to get to the actual 'PackageDescription'. This resolving process is potentially very slow (exponential in the number of flags), especially if there is no possible flag assignment. I plan to correct this by adding some minimum SAT solving capabilities, which will however still be exponential in the worst case. For now, the current implementation should be sufficient, though.
My testing is far from exhaustive, as I haven't yet found a good way of setting up a suitable test environment without endangering to break my current setup. I am setting up a ghc-HEAD installation, but there is currently a build error stopping me from it. Incidentally, Cabal itself now needs configurations to build with ghc-head as well as ghc-6.6.1.
That said, I'd like to ask you to review the patches and possibly also test it on your projects. A preliminary HOWTO is at:
http://hackage.haskell.org/trac/hackage/wiki/CabalConfigurations
Thanks,
/ Thomas