PureScript Lua Package Set

June 24, 2026 ยท View on GitHub

The package set for pslua, the PureScript-to-Lua compiler backend. It collects the core PureScript libraries as Lua forks: each fork keeps the upstream PureScript sources and replaces the JavaScript FFI with Lua that runs on Lua 5.1.

src/packages.json is the source of truth: it lists only the Lua forks. Each psc-* release folds it onto a pinned upstream PureScript registry set and publishes the result as packages.json, a complete set you consume directly with the new spago.

Using the set with spago

Point workspace.packageSet.url at a released packages.json:

workspace:
  packageSet:
    url: https://github.com/purescript-lua/purescript-lua-package-sets/releases/download/psc-0.15.15-20260624/packages.json

That set already carries the Lua forks in place of their JavaScript-targeting upstreams, so you just list what you need under package.dependencies: no extraPackages block and no merge. Releases are tagged psc-0.15.15-<YYYYMMDD>[-N]; latest-compatible-sets.json records the most recent one.

The set targets the new spago (spago.yaml/spago.lock). spago 0.21 / Dhall is no longer supported.

Packages

The Lua forks in this set. Each keeps its upstream PureScript API and ships a Lua FFI in place of the JavaScript one. The package name is the key in src/packages.json; note that the OpenResty bindings are keyed lua-ngx.

PackageRepositoryVersion
arrayshttps://github.com/purescript-lua/purescript-lua-arraysv7.4.1
asserthttps://github.com/purescript-lua/purescript-lua-assertv6.1.1
consolehttps://github.com/purescript-lua/purescript-lua-consolev6.1.1
controlhttps://github.com/purescript-lua/purescript-lua-controlv6.0.1
effecthttps://github.com/purescript-lua/purescript-lua-effectv4.1.3
enumshttps://github.com/purescript-lua/purescript-lua-enumsv6.1.2
exceptionshttps://github.com/purescript-lua/purescript-lua-exceptionsv6.1.1
foldable-traversablehttps://github.com/purescript-lua/purescript-lua-foldable-traversablev6.1.1
functionshttps://github.com/purescript-lua/purescript-lua-functionsv6.1.0
integershttps://github.com/purescript-lua/purescript-lua-integersv6.1.2
lazyhttps://github.com/purescript-lua/purescript-lua-lazyv7.0.0
lua-ngxhttps://github.com/purescript-lua/purescript-lua-ngxv0.2.0
numbershttps://github.com/purescript-lua/purescript-lua-numbersv9.1.3
partialhttps://github.com/purescript-lua/purescript-lua-partialv4.1.0
preludehttps://github.com/purescript-lua/purescript-lua-preludev7.3.0
refshttps://github.com/purescript-lua/purescript-lua-refsv6.1.0
safe-coercehttps://github.com/purescript-lua/purescript-lua-safe-coercev2.0.1
sthttps://github.com/purescript-lua/purescript-lua-stv6.4.0
stringshttps://github.com/purescript-lua/purescript-lua-stringsv6.2.0
unfoldablehttps://github.com/purescript-lua/purescript-lua-unfoldablev6.1.0
unsafe-coercehttps://github.com/purescript-lua/purescript-lua-unsafe-coercev6.1.0

Every other package in the set is an unmodified PureScript package that needs no Lua-specific FFI.

Maintaining a fork

CONTRIBUTING.md is the practical canon: the toolchain, the Lua 5.1 and FFI rules, CI, and the release process. The reasoning behind each rule is recorded as an ADR under docs/adr/. Read the ADRs before a decision that affects the whole set, and add one after making such a decision.