Albert Y. C. Lai | 31 Jan 02:19 2013
Picon

TIPS: To Insure Package Sanity

If you possess multiple instances (may be different versions, may be 
same version different builds) of a package, life can be hard and 
confusing. The problems are explained in my

http://www.vex.net/~trebla/haskell/sicp.xhtml

and faced by many people regularly. (Just read this mailing list.)

cabal-install has a mechanism for not adding more instances. It is 
available since version 0.14.0, or earlier. It is just little known.

It is also a bit manual. You have to give 1 instruction for each 
package. If you want to say it for n packages, you have to give n 
instructions. Also, if you give such an instruction for a package you do 
not already have, there is a problem: now you can't install that package.

To insure package sanity, add these lines to your $HOME/.cabal/config, 
one line per package you want to protect. (Cannot merge into one line.)

constraint: array installed
constraint: bytestring installed
constraint: Cabal installed
constraint: containers installed
...

Generally, do it for every package that comes with GHC, and every 
package that comes with the Haskell Platform if you have it, plus every 
package that you want stable. (You may omit packages that cannot 
possibly be on hackage, e.g., integer-gmp.)

(Continue reading)


Gmane