Haskell – Installation



Note: This section explains how to install Haskell version 8.10.1 on Windows 10. Newer versions or other operating systems may have other ways to install.

Haskell has 3 installers Minimal Installers, Stack and Haskell Platform. We will install the Haskell Platform.

We must use the Powershell under Administrator on Windows to install it. To open Powershell we can press the key Windows + X and choose Windows Powershell (Admin).

Install Chocolatey

Chocolatey is a software manager for Windows. First we have to run the following command:

Set-ExecutionPolicy Bypass -Scope Process

This command allows Powershell to bypass the security checks of unknown software. Of course we’re just installing things that we know are safe, so just type A or Y already Enter is done.

Next we run the following command to install Chocolatey:

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

If the installation is also asked, just type A or Y and Enter.

Install Haskell Platform

Once Chocolatey is installed, run the following command to install Haskell Platform

choco install haskell-dev

Installation may take a few minutes.

Finally, we run the following command to finish.



To check if the Haskell Platform has been installed successfully, run the command ghci. If output similar to the image below is successful.

GHCI (Glasgow Haskell Compiler) is the compiler for the Haskell language. When we run this command, we will be using Haskell’s own shell. To exit this shell, we type :quit already Enter, Note must have 2 dots : before quit.

From here we can use ghci Powershell or a traditional Command Prompt is fine.

Hope this helps!

Source link

Leave a Reply

Your email address will not be published. Required fields are marked *