(Imported from Trac #121, reported by mnislaih on 2007-03-30)
cabal-install understands the --with-hc and --with-hc-pkg options, but seems to be ignoring them. I have ghc 6.6 and 6.7 coexisting in my system, and find that cabal-install will only install packages to the first one in $PATH, no matter what value these options are given.
I don't think this the expected behaviour, but maybe I'm wrong. I will include a patch too
(Imported comment by mnislaih on 2007-03-30)
a two-liner fix
It turns out that I was misunderstanding the way options to cabal-install work. I learnt that you have to pass the -with-hc and -with-hc-pgk options after the install command. Otherwise they are interpreted as options to cabal-install.
To sum up, this is what I wanted:
cabal-install install --user --with-hc=my-ghc --with-hc-pkg=my-ghc-pkg binary
cabal-install --user --with-hc=my-ghc --with-hc-pkg=my-ghc-pkg install binary