0

Okay, so I'm trying to learn how to code in haskell because it's delicious compared to C. My problem is that I've no idea how to set it up after downloading it from the official GHC site: https://www.haskell.org/ghc/download_ghc_7_6_3

I downloaded this version and extracted it, and then followed these steps in the terminal: https://www.haskell.org/downloads/linux, which are the following:

sudo apt-get update
sudo apt-get install -y software-properties-common
sudo add-apt-repository -y ppa:hvr/ghc
sudo apt-get update
sudo apt-get install -y cabal-install-1.22 ghc-7.6.3
cat >> ~/.bashrc <<EOF
export PATH="\$HOME/.cabal/bin:/opt/cabal/1.22/bin:/opt/ghc/7.6.3/bin:\$PATH"
EOF
export PATH=~/.cabal/bin:/opt/cabal/1.22/bin:/opt/ghc/7.6.3/bin:$PATH

Terminal didn't recognize the command "cat"...reported the following:

bash: export: `/.cabal/bin:/opt/ghc/7.6.3/bin:': not a valid identifier
bash: warning: here-document at line 120 delimited by end-of-file (wanted `EOF')
Command 'cat' is available in '/bin/cat'
The command could not be located because '/bin' is not included in the PATH environment variable.
cat: command not found

It also didn't couldn't install "software-properties-common", whatever that is. I then downloaded Stack, but I don't know what to do with it. The instructions say to put it into the PATH, but I don't know how.

14
  • For some reason, it's not finishing the code in the first block, which is [code] <<EOF export PATH="\$HOME/.cabal/bin:/opt/cabal/1.22/bin:/opt/ghc/7.6.3/bin:\$PATH" EOF export PATH=~/.cabal/bin:/opt/cabal/1.22/bin:/opt/ghc/7.6.3/bin:$PATH [/code] Sep 17, 2016 at 19:23
  • 1
    How exactly did you copy the instructions from the website into your terminal? did you paste them via a word processor program that might have added unseen characters or odd line endings by any chance? Sep 17, 2016 at 20:04
  • @steeldriver I didn't copy the code from the website, I wrote it out myself. The source code appears to have been added to my software center, but the program is not appearing when I search for it in the center still. I also don't know what 'stack is". Sep 18, 2016 at 17:11
  • Sorry I don't really have any other ideas - btw, why are you trying to do all this manual installation instead of just installing the supported version of the haskell-platform metapackage direct from the universe repository? Sep 18, 2016 at 17:52
  • This is my third day as a Linux user, so I would prefer the simpler method, but I don't know how to do it. Can you tell me how? At this point, I've installed so much manually, I don't know if I could do it through the software center anymore without undoing what I've already done. Is the universe repository the same thing as the software center? What do I do to install this platform onto my system? I'M SO CONFUSED AND OVERWHELMED!!!! Sep 18, 2016 at 18:08

0

You must log in to answer this question.

Browse other questions tagged .