Mark Eibes
2021-06-12T13:22:31Z

How to build an Apple Silicon version of the PureScript compiler.md

How to build an Apple Silicon version of the PureScript compiler

Updates:

2022-07-01

Add prebuilt binary for 0.15.4

2022-06-24

I changed ghc to be installed with ghcup and ghc version to 9.2.3 to match PS 0.15.3 added the RELEASE flag.

Install ghc

brew install ghcup
ghcup install ghc 9.2.3

Install llvm

brew install llvm

Get opt and llc on your $PATH

sudo ln -s /opt/homebrew/Cellar/llvm/13.0.0_1/bin/opt ~/.local/bin/opt
sudo ln -s /opt/homebrew/Cellar/llvm/13.0.0_1/bin/llc ~/.local/bin/llc

Clone purescript

git clone https://github.com/purescript/purescript.git

Changes to stack.yaml

system-ghc: true
compiler: ghc-9.2.3
compiler-check: match-exact

Install the compiler!

stack install --flag=purescript:RELEASE

Tweak PureScript extension settings in VSCode

Add NPM path: Disable

purs-0.15.4-VTA.zip

This file has been truncated, but you can view the full file.

View raw

purs-M1-0.15.3.zip

View raw
(Sorry about that, but we can’t show files that are this big right now.)

purs-M1-0.15.4.zip

View raw
(Sorry about that, but we can’t show files that are this big right now.)