Compiling cabal with GHC HEAD

Edward Z. Yang ezyang at mit.edu
Thu Aug 27 06:35:21 UTC 2015


Yes, this is a common hazard when trying to use cabal-install
with GHC HEAD.  My recommendation is to use the Cabal tip distributed
with GHC HEAD.

Edward

Excerpts from Oleg Grenrus's message of 2015-08-26 12:29:16 -0700:
> Ah, so this happens because GHC HEAD has Cabal-1.23.0.0 bundled with it. I see.
> And as Cabal master is also 1.23.0.0 they don’t really work together (i.e. cabal-install uses system Cabal).
> 
> Ok, maybe we can wait till GHC’s Cabal reference-commit will be bumped, if not already.
> 
> Thanks for the explanation.
> 
> - Oleg
> 
> > On 19 Aug 2015, at 19:19, Edward Z. Yang <ezyang at mit.edu> wrote:
> > 
> > Oh, this is irritating.
> > 
> > The problem is we recently updated Cabal the library to get rid of
> > InstalledPackageInfo_ (so there is only InstalledPackageInfo now)
> > but it looks like in some situations cabal-install can be compiled
> > with an old version of Cabal (as is happening to you).  I suppose
> > an appropriate remedy is to bump the Cabal library dependency in
> > cabal-install so we don't attempt to use the old Cabal; alternately
> > we could preprocessor macro to make it work in both cases.
> > 
> > Edward
> > 
> > Excerpts from Oleg Grenrus's message of 2015-08-19 07:46:56 -0700:
> >> I tried to fix compilation of Cabal using Cabal HEAD. It’s trivial patch:
> >> 
> >> https://github.com/phadej/cabal/commit/525e0680505c74f42a321e55b357a27222790628
> >> 
> >> but it breaks build on every other released GHC:
> >> 
> >> https://travis-ci.org/phadej/cabal/builds/76288656
> >> 
> >> —
> >> 
> >> The original issue GHC-7.11 complained was:
> >> 
> >> Distribution/Client/Types.hs:71:10: error:
> >>    Illegal instance declaration for
> >>      ‘PackageFixedDeps InstalledPackageInfo’
> >>      (All instance types must be of the form (T t1 ... tn)
> >>       where T is not a synonym.
> >>       Use TypeSynonymInstances if you want to disable this.)
> >>    In the instance declaration for
> >>      ‘PackageFixedDeps InstalledPackageInfo’
> >> 
> >> So I had to add TypeSynonymInstances and FlexibleInstances
> >> 
> >> And also had to change import of InstalledPackageInfo(exposed) in Haddock module.
> >> 
> >> —
> >> 
> >> At this point I’m really confused. I cannot find ‘InstalledPackageInfo_’ symbol anywhere. Can someone explain what happens?
> > 


More information about the ghc-devs mailing list