Ticket #4103 (closed feature request: fixed)
report location of global package db in ghc --info
Cabal does a sanity check to make sure it has a ghc and ghc-pkg program that are the same version. This is sometimes not enough.
In #haskell today we had a case where there was /usr/bin/ghc and /usr/local/bin/ghc-pkg. This gave rise to pretty weird behaviour that was hard to track down. Packages could be built, but when they were installed they always appeared to be broken, missing a dependency on base.
We could improve Cabal's sanity check if it checked that ghc and ghc-pkg agreed on the location of the global package database. That would seem to be the canonical check that the two belong to a single instance of a ghc installation.
To be able to perform this check, it would be useful to extend ghc's --info flag to include the location of the global package db.