ghcup-hs/docs/index.md

3.9 KiB

hide
navigation
toc

{: .main-logo style="width:100px"} GHCup

GHCup is an installer for the general purpose language Haskell.

Join the chat at Libera.chat Join the chat at Matrix.org Join the chat at Discord Join the chat at https://gitter.im/haskell/ghcup Donate

GHCup makes it easy to install specific versions of GHC on GNU/Linux, macOS (aka Darwin), FreeBSD and Windows and can also bootstrap a fresh Haskell developer environment from scratch. It follows the unix UNIX philosophy of do one thing and do it well. Similar in scope to rustup, pyenv and jenv.

GHCup{: .center style="width:700px"}

Quick Install

<div class="ghcup-os-container">
  <h3>Linux, macOS, FreeBSD or <a href="https://docs.microsoft.com/en-us/windows/wsl/"> WSL2 </a></h3>
  <p>Run the following in a terminal (as a non-root user):<p>
  <div class="command-button">
    <pre>
        <span class="ghcup-command" id="ghcup-command-linux">curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh</span>
      </pre>
    <button class="btn" onclick="copyToClipboardNux()" id="ghcup-linux-button"><i class="fa fa-copy"></i></button>
  </div>
  <span>
  </span>
</div>

<div class="ghcup-os-container">
  <h3>Windows</h3>
  <p>Run the following in a PowerShell session (as a non-admin user):<p>

  <div class="command-button">
    <pre>
      <span class="ghcup-command" id="ghcup-command-windows">Set-ExecutionPolicy Bypass -Scope Process -Force;[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;Invoke-Command -ScriptBlock ([ScriptBlock]::Create((Invoke-WebRequest https://www.haskell.org/ghcup/sh/bootstrap-haskell.ps1 -UseBasicParsing))) -ArgumentList $true
      </span>
    </pre>
    <button class="btn" onclick="copyToClipboardWin()" id="ghcup-windows-button"><i class="fa fa-copy"></i></button>
  </div>
</div>