From 7a11363403a98be90cabd6a42dbbf0c4dda1f6d7 Mon Sep 17 00:00:00 2001 From: Jim Date: Sat, 31 Jan 2015 12:26:34 -0500 Subject: [PATCH] update installation for Haskell --- ...ramming_languages_running_on_your_computer.mdwn | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/how_to_get_the_programming_languages_running_on_your_computer.mdwn b/how_to_get_the_programming_languages_running_on_your_computer.mdwn index 3ad86cb4..1077f28c 100644 --- a/how_to_get_the_programming_languages_running_on_your_computer.mdwn +++ b/how_to_get_the_programming_languages_running_on_your_computer.mdwn @@ -373,7 +373,25 @@ On **Ubuntu or Debian Linux**: * In a Terminal, type `sudo apt-get install haskell-platform`. -If any of the instructions above don't work, then you can try alternative instructions for [Mac](http://new-www.haskell.org/downloads/osx) or [Windows](http://new-www.haskell.org/downloads/windows) or [Ubuntu](http://new-www.haskell.org/downloads/linux). After installing the software, open a Terminal and type `cabal update && cabal install alex happy`. Note that this method doesn't install all the extensions that are part of the Haskell Platform, but only the core pieces of GHC. You can use Cabal to download and manage any extra extensions you turn out to need, down the road. - It's useful to know about the general [Haskell wiki](https://wiki.haskell.org) (not restricted to just GHC). They have a [Getting Started](https://wiki.haskell.org/Haskell_in_5_steps) page, which also recommends that you install the Haskell Platform. +If any of the instructions above don't work, then you can try alternative instructions for [Mac](http://new-www.haskell.org/downloads/osx) or [Windows](http://new-www.haskell.org/downloads/windows) or [Ubuntu](http://new-www.haskell.org/downloads/linux). Note that this method doesn't install all the extensions that are part of the Haskell Platform, but only the core pieces of GHC. You can use Cabal to download and manage any extra extensions you turn out to need, down the road. + +**After installing Haskell**, open a Terminal and type: + + cabal update + +It may give you a message about updating your `PATH` variable. On my Mac, I first typed `echo $PATH` and verified that `/usr/local/bin` appeared somewhere in the resulting string. (The elements are divided by `:` characters.) Then I typed this: + + echo 'export PATH="$HOME/Library/Haskell/bin:$PATH"' >> ~/.bash_profile + +That was to update my `PATH` variable as instructed by Cabal. On a Linux machine, or if you installed Haskell differently on your Mac, you might have to type instead: + + echo 'export PATH="$HOME/.cabal/bin:$PATH"' >> ~/.bash_profile + +Then I exited the Terminal and started a new Terminal session. Now if I type `echo $PATH` I should see the directory I just added in the list. Now I can contine setting up Cabal. I next type: + + cabal install alex happy + +This installs some helper programs that Cabal needs to build and install some packages. + -- 2.11.0