Back to Browse

Comparative Languages: Haskell Install & Uninstall (Linux, Windows, WSL)

1.1K views
Aug 19, 2024
10:15

Haskell official page: https://www.haskell.org/ # Installation Linux/WSL/FREEBSD: ## Install GHC Necessary to compile haskell programs `sudo apt install ghc` ## Install GHCUP Allows for REPL, quickly test in the command line - Note: curl can cause issues - Check Linux Version - `lsb_release -a` - Required Packages: - ghc (see above) - Debian || Ubuntu Version 20.10 - 23: - `sudo apt-get install build-essential curl libffi-dev libffi8ubuntu1 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5` - DEBIAN 11 - 12: `build-essential curl libffi-dev libffi7 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5` - Ubuntu Version = 23: - `sudo apt-get install build-essential curl libffi-dev libffi8ubuntu1 libgmp-dev libgmp10 libncurses-dev` ## Get GHCup: - `curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh` - CURL MAY HAVE ISSUES use wget if so - `wget -O /dev/stdout https://raw.githubusercontent.com/haskell/ghcup-hs/master/scripts/bootstrap/bootstrap-haskell | BOOTSTRAP_HASKELL_DOWNLOADER=wget sh` - KEEP NOTE OF PATHS DURING INSTALL - - restart terminal or open new window run `ghcup` to check install ## VSCODE: - Haskell Extension for syntax highlighting ## Running programs - Compile `ghc {PROGRAM PATH}` - Run `./{PRROGRAM NAME}` ## LINUX Uinstall ### GHCup - `ghcup nuke` - - Delete: `~/.ghcup` if nuke doesn't work - - Delete ghcConfig files in: `/home/student/.cabal/config` - `sudo apt-get purge ghc` - `sudo apt-get autoremove` - check `/.bashrc` file for haskell PATHS # Windows Install - Powershell session - - `Set-ExecutionPolicy Bypass -Scope Process -Force;[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; try { & ([ScriptBlock]::Create((Invoke-WebRequest https://www.haskell.org/ghcup/sh/bootstrap-haskell.ps1 -UseBasicParsing))) -Interactive -DisableCurl } catch { Write-Error $_ }` ## Window Uninstall - right click `uninstall Haskell.ps1` Powershell script on desktop - - select Run with Powershell - remove CABAL_DIR env variable

Download

0 formats

No download links available.

Comparative Languages: Haskell Install & Uninstall (Linux, Windows, WSL) | NatokHD