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.dhall holds only these Lua forks. It is the
overrides half of a set, not a whole set: the release workflow copies it
verbatim into each psc-* release asset. To build a project you merge it with
the standard PureScript set and let the Lua forks win over their
JavaScript-targeting upstreams.
In your project's packages.dhall, import both the upstream PureScript set and a
released Lua set, then merge them so the Lua forks override the upstreams:
let upstream-ps =
https://github.com/purescript/package-sets/releases/download/psc-0.15.15-20240309/packages.dhall
let upstream-lua =
https://github.com/purescript-lua/purescript-lua-package-sets/releases/download/psc-0.15.15-20260615/packages.dhall
in upstream-ps // upstream-luaThe right operand wins, so every package that has a Lua fork comes from this set
and everything else comes straight from the PureScript set. Pointing upstream
at the Lua release on its own would give you only the forks, which is why the
merge is required.
Lua releases are tagged psc-0.15.15-<YYYYMMDD>[-N];
latest-compatible-sets.json records the most
recent one, and spago upgrade-set --tag <tag> moves between them.
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 Dhall key in
src/packages.dhall — note that the OpenResty bindings are keyed lua-ngx.
Every other package in the set is an unmodified PureScript package that needs no Lua-specific FFI.
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.