Haskell : GHC, Stake and Cabal Installations(windows, linux, iOS)

Welcome! Haskell installations used to take long and did not have good documentation. Coxygen aims not only to give you text, videos to read or listen to but also to walk you through the process until your development environment is set and you are ready to code. This means that you need to contact Coxygen Helpers to walk you through with this documentation @ https://coxygen.co or contact us using social media found at the website.

On a high level you need to have these pre-requisites:

  1. Skills and knowledge of installing software in windows, linux and iOS
  2. Computer/Laptop with windows(windows 10/11), linux(ubuntu 18, 20, 22) and Mac(TBD)
  3. HDD- SSD(500GB), RAM(32GB) and Internet Speed(30mb/s) and above
  4. Install anydesk or any other remote desktop so that we are able to install with you remotely
  5. Patience : Coxygen is a live support and as such will take away frustrations.

Below are high level guides one can follow

INSTALLING GHC and CABAL on macOS and Linux

Step 1

To use the GHCup installer to install GHC and Cabal, type:
```bash
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh

Step 2

During installation, when prompted:

  • Press ENTER to proceed.
  • To prepend the required PATH variable to $HOME/.bashrc, type P.
  • When prompted to install haskell-language-server (HLS), type N.
  • When prompted to install Slack, type N.
  • Press ENTER to proceed.

Step 3

When GHCup finishes installing GHC and Cabal, type the following commands to reload your shell profile, and then confirm that GHCup installed correctly:

source $HOME/.bashrc
ghcup --version

INSTALLING GHC and CABAL on Windows

Step 1

Open PowerShell and run as administrator.

Step 2

Paste the following command into PowerShell:

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
  • Type choco to verify whether it is installed successfully.
  • Close PowerShell if Chocolatey is installed successfully.

Step 3

Run Command Prompt as an administrator, then type:

choco install ghc cabal

During installation, when prompted:

  • Press y to run the script to install Cabal.
  • Press y to run the script to install GHC.
  • Type refreshenv to refresh PowerShell.
  • Type ghc --version to verify whether it has installed successfully.
  • Type cabal --version to verify whether it has installed successfully.
This layout organizes the steps clearly and makes it easier to follow the instructions for each operating system.