hard to select compiler version
I have installed in /usr both ghc-6.12.3 and ghc-7.0.3, and the default ghc is ghc-7.0.3
running
cabal-dev install mypackage --with-compiler=/usr/local/bin/ghc-6.12.3
installs the package in cabal-dev/packages-7.0.3.conf despite of the fact that I'm using 6.12.3
The workaround is to invoke:
cabal-dev install mypackage --with-compiler=/usr/local/bin/ghc-6.12.3 --package-db=pwd/cabal-dev/packages-6.12.3.conf
Ideally, packages of different compiler versions should not be so easy to mix.
I gave a look to the code now. The default ghc-pkg is called to obtain the version which is used when naming the packages-
Switching the compiler version could be done perhaps with a command line parameter like --compiler-version=
Another option is to infer the "compiler suite version" from the programs specified through --with-compiler=, --with-ghc= or --with-ghc-pkg= parameters.
That sounds like a good idea to me.