[Nix-dev] package dependency problem: ghc-mod: cannot satisfy -package-id mtl-2.1.3.1

Paul Koerbitz paul.koerbitz at gmail.com
Wed Dec 10 15:47:23 CET 2014


Hi all,

I have a problem keeping ghc-mod happy. After trying a number of other
approaches I have opted to install all haskell packages to my profile via
the 'hsEnv' approach.

`ghc-pkg check`, `cabal configure` and `cabal build` all work fine, however
as soon as I include the mtl package in one of my projects `ghc-mod list`
gives

.ghc-mod-wrapped: <command line>: cannot satisfy -package-id
mtl-2.1.3.1-8bcc0591131896cfc8761a93703d4c61:
    mtl-2.1.3.1-8bcc0591131896cfc8761a93703d4c61 is unusable due to missing
or recursive dependencies:
      base-4.7.0.1-e4b74d27ad8c8987c63abc42a80e7335
    (use -v for more information)

I have also tested with hdevtools which gives the same error. This occurs
in a minimal project (
https://gist.github.com/paulkoerbitz/e977a7f9699f160a0071).


The error appears to be coming directly out of ghc:
https://github.com/ghc/ghc/blob/master/compiler/main/Packages.hs#L572


I think the problem is somehow related to me having two versions of the mtl
library installed
/nix/store/dfzwr0si45b0jh2zgz611la75blykvhm-haskell-mtl-ghc7.8.3-2.1.3.1-shared
/nix/store/i05837xp1qw7l7dy735lk3s8d3q56q8q-haskell-mtl-ghc7.8.3-2.1.3.1-shared

According to the `lib/ghc-7.8.3/package.conf.d/mtl-2.1.3.1.conf` files in
these directories, the former of these two depends on the bad base package
(with id e4b74d27ad8c8987...).

So I think the problem is that the first mtl package is somehow picked up
at all by ghc-mod and hdevtools. I don't know why this happens, how to
figure out why it happens and how to fix it....

many thanks in advance
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20141210/14c6c1e1/attachment.html 


More information about the nix-dev mailing list