Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
4 contributors

Users who have contributed to this file

@hdgarrood @kRITZCREEK @MiracleBlue @tthdgarrood
60 lines (39 sloc) 2.48 KB

Installation information

If you are having difficulty installing the PureScript compiler, feel free to ask for help! A good place is the #purescript IRC channel on Freenode, the #purescript channel on FPChat Slack, or alternatively Stack Overflow.

Using prebuilt binaries

The prebuilt binaries are compiled with GHC 8.6.4 and therefore they should run on any operating system supported by GHC 8.6.4, such as:

  • Windows Vista or later,
  • OS X 10.7 or later,
  • Linux ??? (we're not sure what the minimum version is)

This list is not exhaustive. If your OS is too old or not listed, or if the binaries fail to run, you may be able to install the compiler by building it from source; see below. See also https://www.haskell.org/ghc/download_ghc_8_6_4.html for more details about the operating systems which GHC 8.6.4 supports.

Other prebuilt distributions (eg, Homebrew, AUR, npm) will probably have the same requirements.

Installing a pre-built distribution

There are several options available for aquiring a pre-built binary of the PureScript compiler. This is by no means an exhaustive list, and is presented in no particular order. Each example is expected to install the latest available compiler version at the time of running the command. Many of these are provided and maintained by the community, and may not be immediately up to date.

  • NPM: npm install -g purescript
  • Homebrew (for OS X): brew install purescript
  • PSVM: npm install -g psvm

Compiling from source

The easiest way is to use stack:

$ stack update
$ stack unpack purescript
$ cd purescript-x.y.z  # (replace x.y.z with whichever version you just downloaded)
$ stack install --flag purescript:RELEASE

This will then copy the compiler and utilities into ~/.local/bin.

If you don't have stack installed, there are install instructions here.

If you don't have GHC installed, stack will prompt you to run stack setup which will install the correct version of GHC for you.

The "curses" library

The PureScript REPL depends on the curses library (via the Haskell package terminfo). If you are having difficulty running the compiler, it may be because the curses library is missing.

On Linux, you will probably need to install ncurses manually. On Ubuntu, for example, this can be done by running:

$ sudo apt-get install libncurses5-dev
You can’t perform that action at this time.