The aim of this video is to introduce how to install Haskell on Windows
- [Instructor] In this video, we're going to install Haskell onto a Windows computer. Let's start off by visiting Haskell.org in our web browser. From here, we can click on the downloads link, and as we discussed in the previous video, we'll install using Stack. From here, we can see a list of links to popular operating systems, let's go ahead and click on Windows.
You have the option of an installer or a manual download, let's go with the installer. Most computers these days run on 64-bit Windows, I'm going to go ahead and click on that link. And, once that file is downloaded, go ahead and open that. As mentioned in the instructions, the easiest thing to do is to just accept the defaults offered.
So, install it to the suggested location and accept those checkboxes which add those default installation locations to your path and then click on install. Great, so, once that's done, you just need to open up the console, good old cmd.exe, and we can see by typing Stack that the command has installed. Now, we simply need to type Stack setup to configure Haskell globally.
We'll look at installing it in a per-project way in a later video. This does take some time, so I've slightly sped up this video to make it a little bit faster. Don't worry that when you run it it will be a little bit slower. You might notice here that I'm installing GHC version 8.0.1, obviously depending on the latest version at the time that you do this process, you'll get a different version. Once that's done, there's a message advising us we need to open up a new shell, so let's go ahead and close this console and reopen cmd.exe.
Now, we can type Stack ghci to open up the interactive interpreter. And, now we can type in various expressions to have a little play with the interpreter. In the next video, we'll look at installing Haskell onto an Ubuntu Linux machine. Or, you might prefer to skip straight to the next section, getting started with Haskell, where we'll experiment further with ghci, the interactive Haskell interpreter that we just installed using Stack.
Note: This course was created by Packt Publishing. We are pleased to host this training in our library.
- Discovering Haskell with GHCI
- Haskell datatypes and functions
- Using higher order functions for data manipulation and code reuse
- Editing Haskell source code
- Creating a project with Stack
- Writing and conducting tests