[Hackage] #655: for every install there should be an uninstall

Hackage cvs-ghc at haskell.org
Wed May 18 13:41:39 CEST 2011

#655: for every install there should be an uninstall
  Reporter:  nr                  |        Owner:           
      Type:  enhancement         |       Status:  new      
  Priority:  normal              |    Milestone:           
 Component:  cabal-install tool  |      Version:  
  Severity:  normal              |     Keywords:  uninstall
Difficulty:  unknown             |   Ghcversion:           
  Platform:                      |  

Comment(by duncan):

 Replying to [comment:3 nr]:
 > This is still an issue.  I am having a dependency problem with pads-
 haskell-0.2 and haskell-src-meta-0.4.  haskell-src-meta-0.4 depends on
 haskell-src-exts in the range 1.6 to 1.0.  But with haskell-src-exts-1.9,
 pads-haskell will not build.  With haskell-src-exts-1.10.2, pads-haskell
 will build.

 Ok, so if I understood correctly we have:

 pads-haskell-0.2: depends on both haskell-src-meta and haskell-src-exts >=
 haskell-src-meta-0.4: depends on haskell-src-exts >= 1.0 && < 1.9

 Which is not solvable because their constraints on haskell-src-exts are
 inconsistent. One or other package would need to be modified  so that they
 can agree on a common version of haskell-src-exts.

 If this is really the situation then no amount of installing and
 uninstalling will help.

 But I don't think it is the situation, looking on hackage it says that
 haskell-src-meta-0.4 depends on haskell-src-exts >= 1.6 && < 1.11.

 > My machine has *both* versions of haskell-src-exts.

 That's fine, but in the solution there can only be one instance of each

 > But I cannot add the higher dependency to pads-haskell.cabal without
 extensive bleating.   There is clearly an underlying dependency problem
 here that ought to be addressed, but my immediate concern is to get
 software to build.  If 'cabal uninstall' existed, I could uninstall the
 older packages and continue. As it is, the only way I know to make
 progress is to remove all of  ~/.cabal and start over.  Not a good model.

 No, I don't understand. If removing packages would help solve the
 situation then the above description of the version constraints cannot be

 If the situation has a straightforward solution you should be able to do:

 $ cd pads-haskell/
 $ cabal install --dry-run

 And it'll replan everything to try and find some combination of versions
 that works. The sovler is quite happy to reinstall things to achieve a

 It sounds to me like you've been installing individual packages manually
 and trying to construct a solution that way. The far easier approach is
 using `cabal install --dry-run` to construct the whole solution in one go,
 and if necessary adding `--constraint=` flags to guide the solver, e.g.
 `--constraint="haskell-src-exts >= 1.10"`.

 Note also, that this dependency issue is mostly orthogonal to the lack of
 uninstall feature. For finding solutions it doesn't really matter what is
 currently installed. It is also possible to eliminate registered packages
 using ghc-pkg unregister. A cabal uninstall feature would just add
 recovering the disk space. (Not that that is not important, but is is an
 independent issue from dependency solving.)

 Overall, I think we need more clarity on the situation you're looking at
 and what you've been trying.

Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/655#comment:6>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects

More information about the cabal-devel mailing list