new Library Infrastructure spec.

Simon Marlow simonmar at
Tue Jun 15 04:28:09 EDT 2004

On 14 June 2004 18:51, Isaac Jones wrote:

> "Iavor S. Diatchki" <diatchki at> writes:
> (snip)
>> i am a linux user, and i want to download and play with a haskell
>> (binary) library (say wxHaskell).
>> however i am at university, where i don't have root permisions, so i
>> cannot use rpm (as it has fixed installation path).  so i just want
>> to put the library in my home directory and use it,
>> but i don't want to have to recompile it, as this is slow and may
>> require tools i don't have or i don't
>> know how to use.  furthermore, if i don't like the library i should
>> be able to still delete it, and somehow inform my haskell
>> implementation that the library is not there anymore.
> (snip)
> This is what Simon mentioned in (2):
>> Simon Marlow wrote:
> (snip)
>>> 2. Generic binary distribution, generated by './Setup.lhs bdist'
> And we do hope to support it in the near future (probably at the 1.0
> release), but it's not a priority for the 0.1 release.
> BTW, this is somewhat tricky, since you clearly have to get someone
> who has your platform to build it for you, just as they have to build
> an RPM, so it's not clear that there will be a lot of "generic binary
> distribution" packages out there.  Of course, this is a problem that's
> inherant to binary distributions, not just Cabal.
> GHC can actually be installed like this, btw.

Actually there's a problem with the use case that Iavor describes.  We
explicitly do not support changing prefix between build and install, so
the guy building the binary distribution for Iavor would have to
configure with 

  $ ./Setup.lhs configure --prefix=/home/diatchki

We do not support building binary distributions that are

This was a conscious decision - making install-location-neutral binary
distributions is hard in general, and not always possible.  GHC goes to
some lengths to support it.  Most other packaging systems do *not*
support this (eg. neither RPM nor BSD ports do).

If we decide that this is a use case that we really want to support (and
I doubt it, personally), then we could allow a package to optionally
allow changing the prefix at install time.  Most simple Haskell
libraries can allow this without difficulty.  Perhaps it could be
another flag in the Setup.description.  

The problem is that since we don't want to *require* that a package
supports this, you can't guarantee that a random binary distribution you
downloaded will necessarily install in your home directory.


More information about the Libraries mailing list