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

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 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 ->
module Main where
import Prelude
import Data.Symbol (SProxy(..))
import Effect (Effect)
import Effect.Class.Console (logShow)
import Record (insert)
ex1 :: { aNewField :: Int }
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
[
{
"start": [
2,
1
],
"name": "NoName",
"end": [
42,
2
"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) {
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
@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.

data OnConflict = OnConflictDoNothing | OnConflictDoUpdate
-- | typeclass-alias for `genericShowInsert` constraints
class GenericShowInsertOnConflict t r where
genericShowInsertOnConflict
∷ { ph ∷ String }
→ Table t
→ Array { | r }
-> OnConflict
→ String
exports.purescriptSyntax = {
displayName: "Purescript",
name: "purescript",
mimeTypes: ["text/purescript"],
fileExtensions: ["purs"],
editorOptions: { tabSize: 2, insertSpaces: true },
lineComment: "--",
blockCommentStart: "{-",
blockCommentEnd: "-}",
keywords: [