multiple versions of ghc

Andre Pang ozone at algorithm.com.au
Fri May 6 00:59:34 EDT 2005


On 06/05/2005, at 2:41 AM, Malcolm Wallace wrote:

> If so, how do Windows users deal with having more than one version
> of ghc installed simultaneously?  Is this just a bug/oversight that
> can be fixed?

I'm not on my Windows box at the moment, but If I Remember Correctly,  
GHC gets installed to a C:\ghc\ghc-{version} directory by default.   
So, you should be able to install two versions of ghc to e.g. C:\ghc 
\ghc-6.2.2 and C:\ghc\ghc-6.4.

To manage the two different versions, you might be able to use a  
utility such as Junction[1] to create a "symlink" (a junction, in  
NTFS parlance) to the proper GHC directory.  Here's the idea:

  * Add a directory named e.g. C:\ghc\working to your %PATH%.

  * Junction C:\ghc\working to C:\ghc\ghc-6.4 if you want to use GHC  
6.4, or junction it to C:\ghc\working\ghc-6.2.2 if you want to use  
GHC 6.2.2.

  * Write some small batch files to switch between the two  
directories if you need to do it often.

I guess you could also just rename all the .exe's in the GHC install  
directories to have -6.2.2. and -6.4 suffixes, but I dunno if that'll  
break anything.

(Note that I haven't tried any of this, but I see no reason why it  
wouldn't work.)

1. http://www.sysinternals.com/ntw2k/source/misc.shtml#junction


-- 
% Andre Pang : trust.in.love.to.save  <http://www.algorithm.com.au/>




More information about the Glasgow-haskell-users mailing list