Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you install the Haskell Platform over a previous install?

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!

like image 343
Gautam Avatar asked Jan 04 '12 04:01

Gautam


People also ask

How do I install Haskell Platform on Windows?

To set up Haskell environment on your Windows computer, go to their official website https://www.haskell.org/platform/windows.html and download the Installer according to your customizable architecture. Check out your system's architecture and download the corresponding setup file and run it.

How do you check if you have Haskell installed?

If you have installed the Haskell Platform, open a terminal and type ghci (the name of the executable of the GHC interpreter) at the command prompt. Alternatively, if you are on Windows, you may choose WinGHCi in the Start menu. And you are presented with a prompt. The Haskell system now attentively awaits your input.

How do I run Haskell from command prompt?

Open a command window and navigate to the directory where you want to keep your Haskell source files. Run Haskell by typing ghci or ghci MyFile. hs. (The "i" in "GHCi" stands for "interactive", as opposed to compiling and producing an executable file.)


1 Answers

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.

like image 193
ehird Avatar answered Oct 26 '22 03:10

ehird