[Haskell-cafe] Info on dependencies among libs distributed with ghc?

Magnus Therning magnus at therning.org
Mon Apr 21 09:38:13 UTC 2014

On Mon, Apr 21, 2014 at 10:38:51AM +0200, Herbert Valerio Riedel wrote:
> On 2014-04-21 at 07:35:32 +0200, Magnus Therning wrote:
>> On Sun, Apr 20, 2014 at 06:01:33PM -0400, Carter Schonwald wrote:
>>> yup. go crazy :)
>> What other packages that are shipped with Ghc can I update without
>> running into the diamond-dependency problem?
>> Package          | Safe to update
>> =================================
>> Cabal            | ✓
> Problems can arise though, if you install packages which start
> linking against the newer Cabal package, and then you happen to need
> to link those together with the 'ghc' package (which currently
> depends on the Cabal lib bundled with the GHC distro), then you got
> yourself a diamond-dep problem nevertheless

Yes, that would be exactly the kind of problem that prompted me to ask
the question.  So, in short, it is not safe to upgrade Cabal.

Then I have to say it is rather irritating that there is no way for me
to safely provide the latest version of cabal-install!

> If that poses no problem to you, many of the packages listed below
> (except for the wired-in packages, namely: base, ghc-prim,
> integer-gmp, and template-haskell), could be regarded similarly
> "safe to update" (more so in a Cabal sandbox)

Unfortunately I'm not talking about a Cabal sandbox, but rather of
packages in an Arch Linux repository.  So the problems caused by my
actions affect not only me but every user of the repository.

Well, the dependency graph produced by `ghc-pkg dot --global` seems to
indicate that upgrading a single one of the
packages-that-comes-with-ghc is akin to wandering into a proper mine
field.  AFAIU I can't upgrade a single package that `ghc` depends on:

    "ghc-7.8.2" -> "Cabal-"
    "ghc-7.8.2" -> "array-"
    "ghc-7.8.2" -> "base-"
    "ghc-7.8.2" -> "bin-package-db-"
    "ghc-7.8.2" -> "bytestring-"
    "ghc-7.8.2" -> "containers-"
    "ghc-7.8.2" -> "directory-"
    "ghc-7.8.2" -> "filepath-"
    "ghc-7.8.2" -> "hoopl-"
    "ghc-7.8.2" -> "hpc-"
    "ghc-7.8.2" -> "process-"
    "ghc-7.8.2" -> "template-haskell-"
    "ghc-7.8.2" -> "time-1.4.2"
    "ghc-7.8.2" -> "transformers-"
    "ghc-7.8.2" -> "unix-"

On top of that I'd have to re-compile all packages that depend on the
package I do upgrade.  But then all packages come together as
dependencies of `base`, which is hard-wired which I suppose will make
it problematic to even recompile the same version.

In short that would mean that none of the packages bundled with Ghc
are "safe to update".  No?


Magnus Therning                      OpenPGP: 0xAB4DFBA4 
email: magnus at therning.org   jabber: magnus at therning.org
twitter: magthe               http://therning.org/magnus

As long as there are ill-defined goals, bizarre bugs, and unrealistic
schedules, there will be Real Programmers willing to jump in and Solve The
Problem, saving the documentation for later.  Long live Fortran!
     -- Ed Post
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140421/a5783aa4/attachment.sig>

More information about the Haskell-Cafe mailing list