I’m doing some testing of 64-bit GHC on Windows, in tandem with migrating code forward to GHC 7.6.1. This means that I have both the 32-bit and 64-bit versions of GHC 7.6.1 installed, so I can distinguish 64-bit specific problems from general problems with 7.6.1.
My cabal config file ($APPDATA/cabal/config) contains
libsubdir: $pkgid\$compiler
which means that both 32-bit and 64-bit versions of packages I install are ending up in e.g. zip-archive-0.1.1.8/ghc-7.6.1, and overwriting each other.
Is there any variable like $compiler but distinguishing 32 and 64 bit, or other technique I can use to get it to keep the packages apart?
You can use
$arch(and/or$os) with recent enough Cabal versions, which will be replaced by a string such asx86_64(see Cabal documentation section “Path variables in the simple build system” for more details)