[Haskell-cafe] How to make GHC 6.6 and 6.8 co-exist -- was: First
go at reactive programming
stevelihn at gmail.com
Mon Jan 28 23:50:27 EST 2008
I want to raise this issue again since I disagreed (see quoted text
below) that cabal-install can solve the problem of moving from one
version to another completely.
For most /pure/ packages, it is probably true. But for those packages
that have external depedencies, this is hardly so. For example,
HDBC-OBDC package depends on where the odbc driver is installled. You
actually have to modify the <package.cabal> file. The other package
came to mind is the pcre-regex package depending on pcre lib. On my
linux server, it is not obvious pcre-lib can be found in any standard
location specified in <package.cabal> file. I believe there are and
will be more packages like these.
How can cabal-install install this kind of packages without knowing
these external dependencies? They can be a path (prefix kind of
things) or an environment variable, or even an option to GHC compiler
or linker (I am not so sure about this one).
In my brief experience with Ocaml's GODI, GODI has a way to specify
them in a so-called config package. The install package then reads
what it needs from the config package. In perl's CPAN shell, you can
specify them in the cpan config file (to some extent).
I suggest cabal-install looks into this so that moving from one
version to another is indeed painless. 6.8.(1|2) is never the last
Haskell version. The fact that Cabal records the 3rd digit version in
the path indicates a diligent user has to re-install all the packages
on every new 3rd-digit dot release. That is a lot of work!
On Jan 19, 2008 12:38 PM, <gwern0 at gmail.com> wrote:
> > I am asking this question in another thread. The problem is -- I've
> > got many modules compiled under 6.6, some with much agony. If I switch
> > to 6.8, I have to recompile them again. Two issues I image:
> > (1) It may take lots of effort to recompile all the modules. I have
> > forgetten how I got around some of the modules! Too bad... Got to take
> > notes next time...
> These days, every package you'd want to install (with the exception of GHC, Darcs, and the large graphics toolkits) should be available on Hackage or at least in Cabalized form.
> If they aren't, then that's a bug or at least missing feature. The whole point of Cabal was so you don't have to take notes!
More information about the Haskell-Cafe