[Haskell-cafe] Using cmake with haskell

Gregory Crosswhite gcross at phys.washington.edu
Thu May 12 03:13:37 CEST 2011

On 5/11/11 3:11 PM, Bryan O'Sullivan wrote:
> It's a fairly terrible piece of software.
My experience is that it is the only cross-platform build system I have 
used to date that hasn't made my eyes bleed, though I only use it for 
C/C++/Fortran.  I suppose that counts as a personal testimonial in favor 
of it.  Put another way: it is definitely the worst of all build systems 
--- except for all the rest.  :-)

Also, my most recent experience with Cabal is that it is a serious PITA 
if you want to do any non-trivial cross-language stuff with it, since 
essentially its only support for non-Haskell stuff is its hard-coded 
support for C/C++.  It is true that you can add hooks to do arbitrary 
stuff, but at that point you are basically bolting your own build system 
on top of it and have to start from scratch --- or worse, *autotools* 

At one point I was working on my own build system Blueprint that was a 
generalized build system where GHC was just one specific tool within the 
system, but although I got it working just fine, at some point 
implementing all of the of the crazy stuff that is needed for proper GHC 
package support burned me out so I stopped short of finishing it since 
it's not like I didn't have other things to do with my time.  :-)  You 
might ask why I didn't just use the Cabal libraries to help myself out, 
and while I was able to get some use out of them unfortunately most the 
functionality in the Cabal libraries is simply not designed to be used 
by third parties.  (For the curious, the sources are available at 
www.github.com/gcross/blueprint;  look at the *blueprint* branch, not 
the *master* branch which was a first attempt that has been superseded 
by a complete rewrite.)

So anyway, what it comes down to in my experience is

1) Cabal is a tool that can only be used to build Haskell packages with 
some supporting C/C++ code thrown in


2) Cabal is currently the only tool that can realistically be used to 
properly build and install Haskell packages due to the great complexity 
involved with getting all the details right


More information about the Haskell-Cafe mailing list