Converting Yhc to use Cabal
stefanor at cox.net
Wed Jun 20 09:53:53 EDT 2007
On Wed, Jun 20, 2007 at 02:05:36PM +0100, Neil Mitchell wrote:
> I'd like to convert Yhc to use Cabal. This presents several challenges:
> * We would like to depend on fps/base depending on compiler version.
> Configurations will allow this.
> * We have the library Yhc.Core in our tree which is developed in
> parallel with Yhc. What would be nice is to have a Yhc.Core library
> which we don't have to explicitly install each time. I guess having
> all the Yhc.Core files in both the library, and again in the program
> would work.
> * We'd ideally like multiple cabal files in one directory - for things
> like ycr2js, yhc, yhi etc.
> * Can Cabal compile C files? Can it do things like testing the size of
> int/long etc?
> * Is cabal-install ready for serious use? If so we would like to use
> this as our primary method of compilation.
> I suspect that it will not be possible to move entirely to Cabal
> initially - but perhaps Yhc can point out features that Cabal lacks.
I beleive that the best approach would be to split the York build system
into separate build systems for yhc/yhi/etc. Yhi, being a pure C
program, can use a system designed for pure C, such as autotools. Yhc,
being pure Haskell, would be a much better fit for Cabal than the York
toolchain currently is considered as a whole.
More information about the cabal-devel