Talk:Haskell/Getting set up

I disagree with the statement that compiling GHC from source is a bad idea. I do it myself with every new release. What's true is that trying to compile GHC from source without already having a working GHC (generally an older version) is a bad idea, though it's theoretically possible (I've never been able to make it work). Once you have a GHC running, compiling a newer version is easy, though it does take forever and chew up an ungodly amount of disk space (almost 1 gigabyte the last time I did it).

GHCi
The GHCi looks different now. Should I change it? Or wait for one more release? --Uchchwhash (talk) 06:30, 29 February 2008 (UTC)


 * Sure, go ahead :-) -- apfe&lambda;mus 16:15, 1 March 2008 (UTC)

Some "next/prev" links would be useful on this page.

Quiz questions
I have just removed the quiz. It was a little too simple (which would be hard to avoid in a setup prologue like this), and also because I can't really see quizzes being used elsewhere in the book. The answers to the questions, however, had some interesting material. Below is a copy of the quiz in case we decide to use some of the text later on.

{What is the program that translates Haskell code into machine code? - an interpreter + a compiler - a translator - an executable }
 * type=""}
 * Interpreters can be used to execute code in some programming languages, and this includes Haskell (Hugs is an example of a Haskell interpreter), but they do not translate the code into machine code.
 * Compilers are indeed programs that translate source code into machine code, or, in some case, byte code or simply languages of a lower level (i.e. languages that are closer to the workings of the processor and that are less abstract). GHC is the most used Haskell compiler and it compiles Haskell code to machine code.
 * It is true that compilation can be seen as a form of translation and that compilers can, in a way, be considered as translators, but the term “compiler” is more appropriate.
 * An executable file (or simply executable) is a file that can be executed as a program. The result of compilation is sometimes an executable file (sometimes accompanied by other files), but this is not always the case.

{What do we call the line with where you type code into GHCi? { prompt (i) }
 * type="{}"}
 * The prompt is the message that prompts the user to type code. In GHCI, it indicates the modules that are loaded. The Prelude module is always loaded, so it shows it in the prompt message when no other module is loaded.

In case you disagree with the removal, please comment here, or just be bold and reinstate the quiz. --Duplode (discuss • contribs) 03:03, 24 April 2014 (UTC)

Mac requirements
Apple may tie terminal to Xcode. Mac users, even after installing haskell may get this error following when use the provided instructions.

GHCi, version 8.4.2: http://www.haskell.org/ghc/ :? for help xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun `gcc' failed in phase `gcc'. (Exit code: 1)

In order to fix, have to install Xcode command line tools. Can do this in terminal by typing

xcode-select --install

Not much of a wiki editor so didn't want to post poorly written on page itself, but still felt worth a mention.

--198.72.11.1 (discuss) 14:11, 22 May 2018 (UTC)

This page seems to need a revamp
It doesn't mention stack, which is arguably a simpler way to get started for beginners? I would, personally, also mention Nix as an advanced option. —Srid  🍁 23:46, 15 November 2019 (UTC)
 * I would definitely advice against using `stack`. It seems to have entered maintenance mode. It was originally created because `cabal` was difficult to use and `cabal` has pretty much caught up anyway-- it is more supported and it has better documentation. It suits most people's use-cases. -- Ribosomerocker (discuss • contribs) 11:32, 18 July 2023 (UTC)

GHCup and Cabal, also the web interpreter
This page is outdated in the sense that it doesn't recommend people-- especially linux users --to use GHCup and install GHC and Cabal through that. I do know that Cabal is talked about later on in this book, but I believe it's important to recommend a good source for installing them. I can add this now if you want to. Here's the link to GHCup: http://haskell.org/ghcup/, the page we link to does recommend this but we should do so directly. I think it should also discourage installing from sources like Arch repos or Gentoo repos or really their distro's current repos unless they use NixOS, and instead recommend using cabal and GHCup to manage GHC and Haskell libraries. Also, we should recommend https://play.haskell.org as a web interpreter or a testing thing rather than the one on haskell.org -- Ribosomerocker (discuss • contribs) 11:03, 18 July 2023 (UTC)