Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: purescript-lua/purescript-lua
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: issue-61/mkdir-output-parent
Choose a base ref
...
head repository: purescript-lua/purescript-lua
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 13 commits
  • 56 files changed
  • 2 contributors

Commits on Jun 14, 2026

  1. Merge pull request #67 from Unisay/issue-61/mkdir-output-parent

    fix: create the parent directory of --lua-output-file
    Unisay authored Jun 14, 2026
    Configuration menu
    Copy the full SHA
    116c3af View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c4cbc64 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #69 from Unisay/issue-49/array-pattern-index

    fix: array-literal pattern binders read 1-based Lua indices
    Unisay authored Jun 14, 2026
    Configuration menu
    Copy the full SHA
    0293ed2 View commit details
    Browse the repository at this point in the history
  4. fix: lower De Bruijn indices when a binder is removed (#56)

    The IR uses per-name De Bruijn indices: a `Ref (Local n) k` selects the
    k-th enclosing binder named `n`. Two optimizer passes removed a binder
    without lowering the references that had skipped over it, leaving them
    pointing one binder too far out -- an unbound local that the Lua backend
    rejects with `UnexpectedRefBound`. This aborts `Data.Array` compilation
    (`foldRecM`, #56):
    
      * beta reduction drops the applied lambda;
      * dead-code elimination blanks an unused named binder to `ParamUnused`.
    
    Both now repair the survivors with a new `unshift`, the inverse of
    `shift 1`. `shift` is refactored to share its scope-tracking traversal
    (`overFreeIndex`) with `unshift` so the two cannot drift apart.
    
    Tests: property and example coverage for shift/unshift/substitute,
    including the classic capture-avoiding cases (Types spec); a
    well-scopedness invariant over a well-scoped expression generator (this
    found the DCE sibling bug) plus deterministic regressions for both
    passes (Optimizer spec); and an eval golden `Golden.TailRecM2Shadow`
    over the `foldRecM` shape that triggered #56.
    Unisay committed Jun 14, 2026
    Configuration menu
    Copy the full SHA
    7e1a852 View commit details
    Browse the repository at this point in the history
  5. Merge pull request #70 from Unisay/issue-56/beta-reduce-unshift

    fix: lower De Bruijn indices when a binder is removed (#56)
    Unisay authored Jun 14, 2026
    Configuration menu
    Copy the full SHA
    94c13ce View commit details
    Browse the repository at this point in the history
  6. chore: point package-set + fork links at purescript-lua org

    The package set, the prelude/strings forks, and this compiler repo moved
    from Unisay/* to the purescript-lua org. Update the README badges and
    links, the CLAUDE.md references, the test package-set URL, and a golden
    test comment. The template and example repos stay under Unisay, so their
    links are left unchanged.
    Unisay committed Jun 14, 2026
    Configuration menu
    Copy the full SHA
    c041436 View commit details
    Browse the repository at this point in the history
  7. Merge pull request #71 from purescript-lua/chore/migrate-org-links

    chore: point package-set + fork links at purescript-lua org
    Unisay authored Jun 14, 2026
    Configuration menu
    Copy the full SHA
    cbd6e43 View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2026

  1. Configuration menu
    Copy the full SHA
    31f792f View commit details
    Browse the repository at this point in the history
  2. chore: wire nix fmt (treefmt-nix) + robust pre-commit hook

    Convert treefmt.toml → treefmt.nix and expose `nix fmt` / `formatter`:
    cabal-fmt, nixfmt, yamlfmt, and dhall (test/ps/{packages,spago}.dhall).
    
    fourmolu is deliberately left OUT of `nix fmt`: its `--haddock-style` is
    global (single/multi/multi-compact) with no per-comment or by-length mode, so
    any choice rewrites the source's deliberate Haddock mix (short `-- |`, long
    `{- | … -}`). Haskell stays a manual `fourmolu -i lib/ exe/ test/` step.
    
    Excludes test/ps/output goldens and .hlint.yaml (yamlfmt strips its trailing
    template comments). CI gains a content-based format check
    (`nix fmt && git diff --exit-code`). The pre-commit hook is now a tracked
    .githooks/pre-commit wired via `git config core.hooksPath` — worktree/
    submodule-safe, never clobbers an existing .git/hooks, and surfaces `nix fmt`
    failures instead of swallowing them. cabal-fmt/nixfmt reflow
    pslua.cabal/shell.nix.
    Unisay committed Jun 15, 2026
    Configuration menu
    Copy the full SHA
    061baa1 View commit details
    Browse the repository at this point in the history
  3. ci: isolate format check into its own job

    The format check ran in the tests job after 'cabal test all', which
    regenerates test/ps/output/*/corefn.json (treefmt excludes that path).
    'git diff --exit-code' then tripped on the regenerated corefn rather than
    on any formatting issue. Move it to a dedicated job with a clean checkout.
    Unisay committed Jun 15, 2026
    Configuration menu
    Copy the full SHA
    62e3653 View commit details
    Browse the repository at this point in the history
  4. test(ps): repoint the golden set at psc-0.15.15-20260615

    Points test/ps at the new Lua package-set release (the FFI-audit fixes) and
    regenerates the goldens. Churn is cosmetic and behaviour-preserving:
    
    - golden.ir: only `.spago/<pkg>/<version>` source-path bumps.
    - golden.lua: only foreign-table content from the bumped forks (chiefly
      effect's pureE/bindE reformatting; plus the audited FFI fixes where they
      survive DCE).
    - one corefn.json: a source-comment org rename (Unisay -> purescript-lua).
    - All eval/golden.txt are unchanged — runtime output is identical across
      every executable golden, so no behaviour changed.
    Unisay committed Jun 15, 2026
    Configuration menu
    Copy the full SHA
    de17ec0 View commit details
    Browse the repository at this point in the history
  5. test: bound golden-diff memory and cap the test RTS

    The golden suite spiked to ~21 GiB (and got OOM-killed) when many goldens
    differed: hspec held two full pretty-printed blobs plus their diff per
    failure. Two changes:
    
    - Test.Hspec.Golden now reports a bounded, line-oriented summary by default
      (first differing line + a small window + line counts + the actual-file
      path); set PSLUA_GOLDEN_FULL_DIFF=1 for the complete expected/actual diff.
    - The test suite's RTS opts go from -N (all 24 cores → parallel-GC RSS scales
      with core count) to -N4 -c -M16g, so peak residency is bounded and a
      runaway heap-overflows cleanly instead of OOM-killing the machine.
    
    Full suite: 233 examples, 0 failures.
    Unisay committed Jun 15, 2026
    Configuration menu
    Copy the full SHA
    331b2b8 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c32ae27 View commit details
    Browse the repository at this point in the history
Loading