Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
d0846d1
Update LICENSE
UnrelatedString Mar 25, 2025
61f1383
Update ci.yml just the way I like it :3
UnrelatedString Mar 25, 2025
b4a2958
...let's start by using my usual CI action for Spago on Node...
UnrelatedString Mar 25, 2025
f83422e
…except with legacy Spago because I feel like porting to Next is out …
UnrelatedString Mar 25, 2025
968a2e9
Already beginning to regret sticking with legacy Spago :/
UnrelatedString Mar 25, 2025
5ab5bbb
Update spago.dhall because of course the test directory just DIDN’T E…
UnrelatedString Mar 26, 2025
943fabe
Update README.md
UnrelatedString Mar 26, 2025
edc3f31
step 1: actually make it install the Lua interpreter
UnrelatedString Mar 26, 2025
84108fd
UH OH
UnrelatedString Mar 26, 2025
bc1b010
WHATTTTTT DO YOU MEAN INVALID ARGUMENT
UnrelatedString Mar 26, 2025
38eb528
oh it's just because I don't have a main LMAOOO
UnrelatedString Mar 26, 2025
a6988ab
ooooh yeah this is progress now :D
UnrelatedString Mar 26, 2025
211f004
cleaner failure for my ./spago-legacy lmao
UnrelatedString Mar 26, 2025
be89834
committing my first attempt at writing any Lua ever before testing it…
UnrelatedString Mar 26, 2025
d7bc0a5
easy fixes! now it just. stack overflows uhhhhh
UnrelatedString Mar 26, 2025
422b26e
okay so this is deeply worrying BUT it's evidently a problem with the…
UnrelatedString Mar 26, 2025
6891f38
Merge branch 'lua-tests' into lua-ci
UnrelatedString Mar 26, 2025
d58f5ff
nixxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
UnrelatedString Mar 26, 2025
714faf0
make it less confusing :p
UnrelatedString Mar 26, 2025
a4fab27
Merge branch 'lua-ci' of https://github.com/UnrelatedString/purescrip…
UnrelatedString Mar 26, 2025
1887ba4
feel stupid actually committing this scratch work but I'll forget thi…
UnrelatedString Mar 26, 2025
5e1e3ea
and just in case dead code elimination :P
UnrelatedString Mar 26, 2025
dad261f
also WHAT HAPPENED TO THE NIX BUILD IN THE CI aaaaaaa ;_; what kind o…
UnrelatedString Mar 26, 2025
862e075
Update ci.yml because oh. the build got TIMED OUT
UnrelatedString Mar 26, 2025
b7c1fae
://///////////
UnrelatedString Mar 26, 2025
77ce4a6
Update ci.yml
UnrelatedString Mar 26, 2025
81c8600
Update ci.ymlllllll
UnrelatedString Mar 26, 2025
5eee102
Update ci.yml
UnrelatedString Mar 26, 2025
4665847
Update ci.yml because oh yeahhhh
UnrelatedString Mar 26, 2025
f08a50f
Works with the JS all removed! :D
UnrelatedString Mar 26, 2025
867033f
okay so wait how does this even pass if table.concat what
UnrelatedString Mar 31, 2025
7df7ae6
so I forgot to actually run the tests BUT ALSO WHAT
UnrelatedString Mar 31, 2025
53274a3
UHHHHHHHHH
UnrelatedString Mar 31, 2025
9aef507
I understand less by the minute. what is and isn't running and when a…
UnrelatedString Mar 31, 2025
45c81ee
continuing to be baffled by SO much more failing on CI than locally..…
UnrelatedString Mar 31, 2025
378a370
only two????
UnrelatedString Mar 31, 2025
5bec572
so I am uh. actually running things locally at least
UnrelatedString Mar 31, 2025
5fe05cc
...oh. also how did fixing the indexing not fix the nils ???
UnrelatedString Mar 31, 2025
ca2cba8
ah. of course. (why the FUCK is nan nil????)
UnrelatedString Mar 31, 2025
dd6d790
oh. it's... not :P
UnrelatedString Mar 31, 2025
d7bc9fe
...progress. (fixed NaN show)
UnrelatedString Mar 31, 2025
0cab45e
okay I don't entirely understand how this even passes in the JS backend?
UnrelatedString Mar 31, 2025
c2758e0
okay so I looked at the generated JS for these tests and. it's actual…
UnrelatedString Mar 31, 2025
41fa1f9
fixed Ord Boolean. WHY does Lua not support that aaaa ;_;
UnrelatedString Mar 31, 2025
19ac73f
shamelessly commenting other fails out because I uhh. kinda forgot th…
UnrelatedString Apr 1, 2025
a6379c5
...and I typoed one of the tests but THERE WE GO ughhh aaaaaaaa
UnrelatedString Apr 1, 2025
1ce7126
oh no...
UnrelatedString Apr 1, 2025
4c845f3
WE LOVE BOILERPLATEEEEEEE
UnrelatedString Apr 1, 2025
2ce1c5c
changelog
UnrelatedString Apr 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 22 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
name: CI

on:
push:
branches: [master]
pull_request:
on: [push]

jobs:
build:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: purescript-contrib/setup-purescript@main
with:
purescript: "unstable"
- name: Install Lua interpreter
uses: leafo/gh-actions-lua@v11

- uses: actions/setup-node@v2
- name: Set up Node 20
uses: actions/setup-node@v4
with:
node-version: "14.x"
node-version: "20.x"

- name: Install dependencies
- name: Set up Purescript and spago-legacy
run: |
npm install -g bower
npm install
bower install --production
npm i -g purescript
npm i -g spago-legacy

- name: Build source
run: npm run-script build
- name: Download pslua
run: wget -c https://github.com/Unisay/purescript-lua/releases/download/0.2/pslua-linux_x86_64.tar.gz -O - | tar -xz

- name: Run tests
run: |
bower install
npm run-script test --if-present
- run: mkdir bin
- run: mv pslua bin

- name: Put pslua on PATH
run: realpath bin >> $GITHUB_PATH

- name: Build and test
run: ./test.sh
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ New features:

Bugfixes:

- `Semigroup (Array a)` no longer type errors at runtime

Other improvements:

- Ported tests

## [v6.0.1](https://github.com/purescript/purescript-prelude/releases/tag/v6.0.1) - 2022-08-18

Other improvements:
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2018 PureScript
Copyright 2018-2025 PureScript, Unisay, UnrelatedString

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# purescript-prelude
# purescript-lua-prelude

[![Latest release](http://img.shields.io/github/release/purescript/purescript-prelude.svg)](https://github.com/purescript/purescript-prelude/releases)
[![Build status](https://github.com/purescript/purescript-prelude/workflows/CI/badge.svg?branch=master)](https://github.com/purescript/purescript-prelude/actions?query=workflow%3ACI+branch%3Amaster)
[![Latest release](http://img.shields.io/github/release/Unisay/purescript-lua-prelude.svg)](https://github.com/Unisay/purescript-lua-prelude/releases)
[![Build status](https://github.com/Unisay/purescript-lua-prelude/workflows/CI/badge.svg?branch=master)](https://github.com/Unisay/purescript-lua-prelude/actions?query=workflow%3ACI+branch%3Amain)
[![Pursuit](https://pursuit.purescript.org/packages/purescript-prelude/badge)](https://pursuit.purescript.org/packages/purescript-prelude)

The PureScript prelude.
The PureScript prelude for Lua.


## Installation

Expand All @@ -14,4 +15,4 @@ spago install prelude

## Documentation

Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-prelude).
Module documentation (for the implementation of the same API for the JavaScript backend) is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-prelude).
1 change: 0 additions & 1 deletion dist/.gitignore

This file was deleted.

6 changes: 6 additions & 0 deletions spago-legacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh
if spago-legacy --version > /dev/null; then
spago-legacy "$@"
else
spago "$@"
fi
3 changes: 2 additions & 1 deletion spago.dhall
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{ name = "purescript-lua-prelude"
, dependencies = [ ] : List Text
, packages = ./packages.dhall
, sources = [ "src/**/*.purs" ]
, sources = [ "src/**/*.purs", "test/**/*.purs" ]
, backend = "pslua --foreign-path . --lua-output-file output/main.lua"
}
15 changes: 0 additions & 15 deletions src/Control/Apply.js

This file was deleted.

9 changes: 0 additions & 9 deletions src/Control/Bind.js

This file was deleted.

8 changes: 0 additions & 8 deletions src/Data/Bounded.js

This file was deleted.

23 changes: 0 additions & 23 deletions src/Data/Eq.js

This file was deleted.

26 changes: 0 additions & 26 deletions src/Data/EuclideanRing.js

This file was deleted.

10 changes: 0 additions & 10 deletions src/Data/Functor.js

This file was deleted.

15 changes: 0 additions & 15 deletions src/Data/HeytingAlgebra.js

This file was deleted.

43 changes: 0 additions & 43 deletions src/Data/Ord.js

This file was deleted.

18 changes: 17 additions & 1 deletion src/Data/Ord.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,23 @@ local unsafeCoerceImpl = function(lt)
end

return {
ordBooleanImpl = (unsafeCoerceImpl),
ordBooleanImpl = (function(lt)
return function(eq)
return function(gt)
return function(x)
return function(y)
if not x and y then
return lt
elseif x == y then
return eq
else
return gt
end
end
end
end
end
end),
ordIntImpl = (unsafeCoerceImpl),
ordNumberImpl = (unsafeCoerceImpl),
ordStringImpl = (unsafeCoerceImpl),
Expand Down
5 changes: 0 additions & 5 deletions src/Data/Reflectable.js

This file was deleted.

12 changes: 0 additions & 12 deletions src/Data/Ring.js

This file was deleted.

13 changes: 0 additions & 13 deletions src/Data/Semigroup.js

This file was deleted.

10 changes: 8 additions & 2 deletions src/Data/Semigroup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@ return {
concatArray = (function(xs)
return function(ys)
if #xs == 0 then return ys end
if #ys == 0 then return xs end
return table.concat(xs, ys)
local r = {}
for i, v in pairs(xs) do
r[i] = v
end
for i, v in pairs(ys) do
r[#xs+i] = v
end
return r
end
end)
}
25 changes: 0 additions & 25 deletions src/Data/Semiring.js

This file was deleted.

Loading