On Wed, Oct 26, 2011 at 1:26 AM, Claudio Nieder <private@claudio.ch> wrote:
Hi,
many thanks to all who answered my post, I learned a lot by reading them and the referenced web pages.
You probably have some packages of yours installed as user and some others globally. Have a look at:
This explains well why I got the strange error.
I recommend that as soon as you have a running Haskell Platform to always install new packages with cabal install ... --user
This is actually what I did. But this is not fool proof (and I was here the fool), because I can still do harm by asking cabal to install packages - which get registered in the user package db - that are part of ghc - thus registered also in the global db.
So I decided now to go the all global route - which is not really global as I did install ghc anyway in my own directory - so that there is only one package db.
I don't think this is foolproof, either. Correct me, anyone else, if I'm wrong, but in some cases cabal will want to rebuild your packages that came with GHC; sometimes this can involve breaking a package that cannot be rebuilt (e.g. the ghc package depends on the directory package, if cabal tried to reinstall that for some reason, the ghc package would be broken). The advantage of doing everything in the user space is that it's relatively less painful to undo mistakes, because you can just unregister clones; you might break some packages, but they will all be from Hackage and hence in principle replaceable.