Functional Programming and Intelligent Algorithms

# Software Installation

## Week 1: Getting started with Haskell

### 1 Software Installation

We will be programming in Haskell for this module. Hence you will need to install the Haskell platform one way or another.

All our examples and instructions will assume that you use some kind of standard Unix system, typically linux. We know that many students use more obscure operating systems, and we will try to help. However, it is your own responsibility to make it work if you use non-standard systems.

We have prepared a virtual machine image which you may try if you want to try out linux on a non-linux system. In our experience though, most students find it easier to install the Haskell-platform on their system, and live with quirks, than to install a virtualbox and the virtual machine. It is your choice.

#### 1.1 Install the Haskell Platform

You can download and install the Haskell platform from https://www.haskell.org/platform/. Many linux distros also have it available in the standard repos. For instance, in Debian you can do

apt−get install haskell−platform 

You will probably have to install a number of cabal packages. For instance we need easyplot later today. You can install it using the following command:

cabal install easyplot Other packages can be installed as the need arises. Which packages you need may depend on your OS and how you install the Haskell platform.

You will also need a text editor to edit source code. Windows Notepad is a bad choice because it does not understand unix-style linebreaks. Most other editors should work well, even on files imported from other operating systems. Popular examples include gedit, vim, and emacs.

Easyplot depends on gnuplot which has to be installed as a standalone problem. On Debian/Ubuntu this is straight forward:

apt−get install gnuplot On recent releases on Mac OS you may have to instal an X server, such as XQuartz, to make gnuplot work.

#### 1.2 Install Virtualbox

1.
2.
Unzip the archive and put in a suitable place.
3.
Start virtualbox.
4.
Import the fpia VM (Machine $\to$ Add)
5.
Start the VM
6.