Douglas Lewit
Douglas Lewit

Reputation: 199

Two different Haskell Platform installations on my Ubuntu disk

I recently upgraded to Ubuntu 18.04, erasing everything on my old disk, including the Haskell platform. Then I did the following in order to get the Haskell platform on my disk:

sudo apt-get install haskell-platform

(Actually, I think in Ubuntu 18.04 you don't really need the word "get" but it still works anyhow. So I think I just entered this into my Terminal: sudo apt install haskell-platform)

Then I noticed that the version I installed was version 8.0.2, which is not really the current version of the platform. So I visited www.haskell.org and downloaded and installed the current version of the platform, which is version 8.4.2. Now I have two different versions of the Haskell Platform, one from the official website and the other one is from an Ubuntu repository. (The one in the Ubuntu repository is a little out-of-date.)

The one that is "active" is the one I installed last, which is version 8.4.2. So if I type ghci in my Terminal, I get ghci version 8.4.2. If I want the older version, then I can do the following: /usr/bin/./ghci-8.0.2 and that launches the slightly older version of the interactive interpreter.

Is there any harm in keeping both versions? How can I safely remove the version I installed from Ubuntu's repository? If I do that, would I then have to reinstall the Haskell Platform from Haskell's official website at www.haskell.org/? Should I just keep them both?

Upvotes: 0

Views: 318

Answers (1)

SkyWriter
SkyWriter

Reputation: 1479

Having some experience in devops, I'd suggest you first get rid of both. Even though it does work now, it is most likely to cause problems down the road when you upgrade things, as this installation is definitely not how it is supposed to work, hence not supported.

Once you have a clean slate again, you can get the latest Haskell Platform via your preferred way, or just use Haskell Stack, which is something I use daily, quite happy with and a strong advocate of.

Besides being a Haskell version manager, Stack maintains a set of compatible libraries in a so-called LTS'es and helps you avoid Cabal Hell and get reproducible builds by pinning a certain version of Haskell and a set of libraries to your source code. So as the world moves on, you still have mindful control over GHC and libraries versions your project uses and can build it with close to zero additional effort even a few years after you developed it.

Upvotes: 1

Related Questions