<div dir="ltr"><div style>Johan asked me a great question about installing HP release candidates on Mac OS X, and I thought the answer would be of general interest:</div><div><br></div><div>On Wed, May 8, 2013 at 8:55 AM, Johan Tibell <span dir="ltr"><<a href="mailto:johan.tibell@gmail.com" target="_blank">johan.tibell@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>I always want to try out new RCs when they are released, but I'm always worried I'll screw up my current install. Can these happily coexist next to old versions of the platform and random GHC binary installs I have?</div>
</div></blockquote></div><div><br></div>Multiple HPs can exist side-by-side <b>so long as they are different GHC versions</b>. Nothing in the older install will get clobbered..... <b><font color="#cc0000">EXCEPT</font></b>, the "bare" symlinks in <font face="courier new, monospace">/usr/local/bin</font> will point at the newer version. For example, after installing both the last HP, and this RC1, I now have:<div>
<br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div style><div style><font face="courier new, monospace">/usr/bin/ghc@ -> /Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/bin/ghc</font></div>
</div><div style><div style><font face="courier new, monospace">/usr/bin/ghc-7.4.2@ -> /Library/Frameworks/GHC.framework/Versions/7.4.2-i386/usr/bin/ghc-7.4.2</font></div></div><div style><div style><font face="courier new, monospace">/usr/bin/ghc-7.6.3@ -> /Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/bin/ghc-7.6.3</font></div>
</div></blockquote><div><br></div><div style>The following executables in <font face="courier new, monospace">/usr/bin</font> are symlinked in both versioned and non-versioned forms: </div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
<div><div style><font face="courier new, monospace">ghc ghc-pkg ghci haddock </font><font color="#3d85c6">[set 1]</font></div></div></blockquote><div><div><br></div><div style>These executables in <font face="courier new, monospace">/usr/bin</font> and docs are linked only bare, and will end up pointing to the new ones:</div>
<div style><br></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div style><div style><font face="courier new, monospace">hpps hpc hsc2hs runghc runhaskell </font><font color="#3d85c6">[set 2]</font></div>
</div><div style><div style><font face="courier new, monospace">alex cabal happy patch-ghc-settings uninstall-hs </font><font color="#3d85c6">[set 3]</font></div></div><div style><div style><font face="courier new, monospace">/usr/share/man/man1/ghc.1</font></div>
</div><div style><div style><font face="courier new, monospace">/usr/share/doc/ghc</font></div></div></blockquote><div><div><br></div><div style>You can reset the executables in <font color="#3d85c6">[set 1] </font>and <font color="#3d85c6">[set 2]</font>, as well as the docs, to a particular version with:</div>
<div style><br></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div style><font face="courier new, monospace">sudo /Library/Frameworks/GHC.framework/Versions/</font><font face="arial, helvetica, sans-serif" color="#6aa84f"><i><version></i></font><font face="courier new, monospace">/Tools/create-links dummy /Library/Frameworks /usr</font></div>
</div></blockquote><div><div style><br></div><div style>Note that this will <i>not</i> update the links for the executables marked <font color="#3d85c6">[set 3]</font>, though usually using later versions of those executables is no problem.</div>
<div style><br></div><div style><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">
<div>If I could install a RC without disrupting my current setup (not changing the ghc, etc symlinks would be a bonus) I'd be much more likely to try them out!<br></div></div></blockquote><div><br></div><div style>This would be a good option for a re-worked installer. However, installers with user options on Mac OS X are a bit tricky both to develop and for users to use....</div>
<div style><br></div></div></div><div style> - Mark</div><div style><br></div></div>