I was getting strange behaviour from
cabal install --with-hc-pkg=ghc-pkg-7.8.4 --with-hc=ghc-7.8.4
until I realized that one option is a prefix of the other, and was ignored. (The second option should be --with-compiler, I think)
I think this is wrong behaviour, instead cabal-install should complain loudly, and refuse to start.
This is for
cabal-install version 1.22.7.0
using version 1.22.4.0 of the Cabal library