[Haskell-cafe] Cabal pre-compiled packages

Andrew Coppin andrewcoppin at btinternet.com
Sat Feb 27 10:39:27 EST 2010

Diego Souza wrote:
> Hi,
> currently when one install a cabal package it compiles it and then 
> install generated binaries. I wonder whether or not it would be useful 
> to have pre-compiled binaries as many package managers usually do 
> (e.g. apt). I often think that would save some time on the expense of 
> a busier hackage server capable of generating packages for many 
> different platforms.
> I'm particularly thinking on the following scenario: suppose that you 
> have code that is ready for production. If cabal supported 
> pre-compiled binaries, there is no need to install ghc or eventually 
> any other compiler, just runtime environment and eventually cabal. I 
> must say that I have no experience in doing this in Haskell (just 
> personal/small projects), so I suppose one have to generate binaries 
> and use other sort of package manager to deploy code to production 
> (which sounds reasonable as well). Thus, if the assumption is correct, 
> cabal is a development tool, not something one could to only deploy 
> runtime-only packages.
> I also would appreciate if others could share how usually this is managed.

As far as I know, Cabal is mainly used for deploying Haskell libraries. 
If you want to deploy a finished Haskell program, just compile it into 
an executable program and make it downloadable from somewhere. (Much 
like a C program or any other kind of program.) For example, if you hunt 
around, you can find Darcs available as a binary download (even for 

It might be nice if certain Haskell libraries were available in binary 
form. The trouble is, Haskell libraries have to be recompiled for each 
version of the compiler. This is why it's usually released in source 
form; otherwise you have to make a bazillion different binaries, one for 
every version of GHC on every platform that GHC runs on. Much easier to 
just compile from source, Unix-style. (And I've only come across one 
Haskell package that takes more than 11 seconds to compile anyway.)

More information about the Haskell-Cafe mailing list