simultaneous ghc versions

Herbert Valerio Riedel hvriedel at
Fri Jul 31 18:26:43 UTC 2015

On 2015-07-31 at 20:10:01 +0200, Evan Laforge wrote:


> I've long used a few shell scripts (recently upgraded to python) to
> manage ghc installs.  A 'set' which creates symlinks to make a
> particular version current, and an 'rm' to remove all traces of a
> version.  But due to the inconsistency, I have to remember to run
> "fix" first, which moves the unversioned binaries to versioned names.
> As an aside, I have three scripts I use all the time: set version,
> remove version, and remove library.  Come to think of it, shouldn't
> ghc include this, instead of everyone creating their own shell scripts
> by hand?

Btw, I simply prepend to the $PATH env variable, or pass the appropriate
executable name to `cabal`'s

   -w --with-compiler=PATH            give the path to a particular compiler

option. Having user-global symlinks seems to be the least desirable way
to handle multiple installed ghc versions to me, as the choice becomes
global (so you when you switch ghc versions in one xterm, this suddenly
affects all other xterms, rather than applying only for the scope of the
one single xterm where I want this to apply).

More information about the Glasgow-haskell-users mailing list