7

I've been working with Haskell lately, and installed gtk2hs (a gtk library for Haskell) a few days ago using MacPorts. For some reason, MacPorts saw fit to install GHC 6.10 over my previous GHC 6.12 install, but I didn't really care.

Now I find myself desiring the improved parallelism support of the latest Haskell Platform, so I installed it today, and it installed successfully - except that when I type in "ghc -v" in Terminal, I am informed that I have GHC 6.10 still.

I have tried using uninstall-hs, and it informs me that I have three Haskells on my system: versions 6.12, 6.12.3, and 7.04. I'm not sure how that 6.12.3 showed up, and what happened to the 6.10? Most importantly, how can I start running version 7.04? Thanks in advance for your help!

ehird
  • 40,602
  • 3
  • 180
  • 182
Gautam
  • 1,732
  • 4
  • 18
  • 26

2 Answers2

4

You should completely purge your MacPorts install of GHC and your current Platform installation and install the Haskell Platform directly with the OS X installer. After that, future versions of the Haskell Platform can be upgraded to cleanly simply by installing them.

The following command should remove your MacPorts GHC:

$ sudo port uninstall --follow-dependents ghc

You might want to execute something like find /usr /opt/local -name '*ghc*' after uninstalling everything to check that there's no remaining traces.

ehird
  • 40,602
  • 3
  • 180
  • 182
  • Thanks for the command!. However, this did not answer how to force Mac ports to install desired version. I have GHC 7.8 and want to move to GHC 7.10 – Vikram Sep 18 '16 at 19:31
2

To really clear out the old install, you've got to go in and delete things by hand.

This will be very useful: Everywhere that GHC/Haskell Platform installs

Might want to look here also: http://www.vex.net/~trebla/haskell/sicp.xhtml

Community
  • 1
  • 1
amindfv
  • 8,438
  • 5
  • 36
  • 58
  • +1; I doubt this is necessary for the MacPorts install — it should have complete knowledge of the installed locations — but it'll help for removing the Platform installation. – ehird Jan 04 '12 at 08:39
  • @ehird: That might not be true: I had major difficulties uninstalling the Haskell Platform which came from a MacPorts install. – amindfv Jan 04 '12 at 19:55