Skip to content

Instantly share code, notes, and snippets.

View i-am-the-slime's full-sized avatar
🪝

Mark Eibes i-am-the-slime

🪝
View GitHub Profile
@i-am-the-slime
i-am-the-slime / How to build an Apple Silicon version of the PureScript compiler.md
Last active July 7, 2022 10:06
How to build an Apple Silicon version of the PureScript compiler

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.

module Bla where
newtype Sponsored = Sponsored String
derive instance newtypeSponsored ∷ Newtype Sponsored _
derive newtype instance eqSponsored ∷ Eq Sponsored
derive newtype instance ordSponsored ∷ Ord Sponsored
newtype VerifiedAccount = VerifiedAccount String
"use strict"
var diff2html = require("diff2html").Diff2Html;
var unidiff = require('unidiff');
var stringify = require('json-stable-stringify');
exports.stableStringify = function(x) {
return stringify(x);
}
exports.isJsonEqual = function(a) {
[
{
"start": [
2,
1
],
"name": "NoName",
"end": [
42,
2
module Main where
import Prelude
import Effect (Effect)
import Effect.Class.Console (logShow)
import Prim.Row (class Nub)
import Prim.Row as Row
import Prim.RowList as RL
import Record (get) as R
module Main where
import Prelude
import Data.Symbol (SProxy(..))
import Effect (Effect)
import Effect.Class.Console (logShow)
import Record (insert)
ex1 :: { aNewField :: Int }
module Abomination where
jsx ∷
∀ to thru from.
Lacks "kids" from =>
Justifiable { | Kids from } { | Kids thru } =>
Fillable { | Kids thru } { | Kids to } =>
-- arguments
ReactComponent (Record (Kids to)) ->
Record from ->

Getting started with Purescript Native

Prerequisites

In order to be ready to start working with purescript native, you will need three things:

  1. Go
  2. The psgo compiler
  3. The spago package manager

The document below describes where to get each of those.

module Main where
import Prelude
import Debug.Trace (spy)
import Effect (Effect)
import Effect.Aff (attempt, launchAff_)
import Redis (createClient)
main :: Effect Unit
module Main (main) where
import Prelude
import Data.Foldable (traverse_)
import Data.Function.Uncurried (Fn2, runFn2)
import Data.Maybe (Maybe(..), fromMaybe)
import Data.String (toUpper)
import Data.Time.Duration (Milliseconds(..))
import Effect (Effect)