[Haskell-cafe] cabal-install package precedence with --extra-lib-dirs
Albert Y. C. Lai
trebla at vex.net
Fri Feb 3 00:25:31 CET 2012
On 12-02-02 12:12 AM, Scott Lawrence wrote:
> When running cabal install with --extra-lib-dirs=./lib, if a package is
> found both in ~/.cabal/lib and ./lib, cabal seems to favor the
> ~/.cabal/lib one. Is there some way to specify the correct precedence to
--extra-lib-dirs is for C libs only.
Haskell packages for GHC are not rediscovered every time by scanning
"lib" directories. They are registered in 2 metadata stores (3 if you
add an option), and only the metadata stores are consulted. On existence
of packages, this is final.
The 2 metadata stores also come with a precedence: the "user" store has
higher priority than the "global" store. On disambiguation of packages,
this is final.
More information about the Haskell-Cafe