Upgrading GHC 7.6.3 global packages to latest versions

Hi, I am trying to install the latest version of some hackage packages I use often in GHC 7.6.3. However, I am having some problems with packages like [containers] and [time], which are shipped with GHC as global packages. Now when I try to install the latest version of the [time] package, I have 2 time packages, 1 in the global package db (the older version), and 1 in the user package db (the newer version). Now I would like subsequent installed packages to always use the latest version of the [time] package. But if i try to install the [plugins] package, cabal says: #In order, the following would be installed: #ghc-paths-0.1.0.9 (new package) #random-1.0.1.1 (reinstall) changes: time-1.4.1 -> 1.4.0.1 #plugins-1.5.3.0 (new package) So I guess I have 2 options here: 1. unregister all the global packages so that I can install the latest versions of all the global packages. 2. force cabal to only look at latest packages in user package db (not sure if this is possible). Can anyone please point me in the right direction here. I have read about [cabal-dev], but I am not sure if it can be used to solve my problem. Regards --Rouan

Hi!
In "shipped with GHC", did you mean Haskell Platform? If so, cabal-dev is
one way to solve your problem here. You can do #1 too, but that would
probably break some packages.
On 28 June 2013 10:06, Rouan van Dalen
Hi,
I am trying to install the latest version of some hackage packages I use often in GHC 7.6.3.
However, I am having some problems with packages like [containers] and [time], which are shipped with GHC as global packages.
Now when I try to install the latest version of the [time] package, I have 2 time packages, 1 in the global package db (the older version), and 1 in the user package db (the newer version).
Now I would like subsequent installed packages to always use the latest version of the [time] package. But if i try to install the [plugins] package, cabal says:
#In order, the following would be installed: #ghc-paths-0.1.0.9 (new package) #random-1.0.1.1 (reinstall) changes: time-1.4.1 -> 1.4.0.1 #plugins-1.5.3.0 (new package)
So I guess I have 2 options here:
1. unregister all the global packages so that I can install the latest versions of all the global packages.
2. force cabal to only look at latest packages in user package db (not sure if this is possible).
Can anyone please point me in the right direction here. I have read about [cabal-dev], but I am not sure if it can be used to solve my problem.
Regards --Rouan
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On 13-06-28 04:06 AM, Rouan van Dalen wrote:
Now when I try to install the latest version of the [time] package, I have 2 time packages, 1 in the global package db (the older version), and 1 in the user package db (the newer version).
Now I would like subsequent installed packages to always use the latest version of the [time] package. But if i try to install the [plugins] package, cabal says:
You're trying to use plugins. That means you're also trying to use the GHC API (because plugins uses it). Then you have 0 options. The GHC API manifests as a package, called "ghc" again. It comes with GHC, and it is built againt whatever instances of array, bytestring, containers, time, template-haskell, etc etc that also come with GHC. It will not work with any array, bytestring, containers, time, template-haskell, etc etc that you build later. Definitely not different versions, and highly likely not even same version. It is sensitive to the exact build. Look at the output of ghc-pkg field ghc depends You see versions and hashes. You have to match versions and hashes, both of them. It accepts no substitute. More generally, it is confusing for cabal non-pros to allow two versions to co-exist. Oh, the pros keep saying it's fine, but that's because they are pros, they aren't confused. To determine whether you are a pro, read my http://www.vex.net/~trebla/haskell/sicp.xhtml If it contains some information new to you, you are not a pro.
participants (3)
-
Albert Y. C. Lai
-
Rouan van Dalen
-
Shou Toramaru