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/purescript-arrays
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: purescript-lua/purescript-lua-arrays
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 10 commits
  • 37 files changed
  • 3 contributors

Commits on Jul 3, 2023

  1. nix flake

    Unisay committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    2e2ce3c View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2023

  1. Init purescript lua files

    Unisay committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    22dd99f View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2024

  1. Wrapped foreigns

    Unisay committed Mar 30, 2024
    Configuration menu
    Copy the full SHA
    fa27099 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2026

  1. feat: bring arrays to the canon and make the FFI Lua 5.1-safe

    Scaffolding. Move purescript-lua-arrays onto the package-set canon: an
    overlay flake (purs 0.15.16, spago 0.21.0, Lua 5.1, pslua at the current
    main), hardened CI, scripts/build, AGENTS.md + CLAUDE.md, a clean
    .gitignore, and the purescript-lua org package-set URL. Drop the
    .eslintrc, bower.json and package.json.
    
    FFI fix. The foreign modules used Lua 5.2/5.3 builtins absent in 5.1:
    src/Data/Array.lua called table.pack(table.unpack(...)) in unconsImpl,
    _insertAt, _deleteAt, _updateAt and the sort, now { unpack(...) }; and
    src/Data/Array/ST.lua used table.move in freeze/thaw, pushAll, unshiftAll,
    splice and sortBy, now a hand-written overlap-safe move with the same
    semantics as Lua 5.3 table.move (it copies backwards when the source and
    destination overlap to the right).
    
    Tests. scripts/test runs test/regression/array_st.lua, a lean guard over
    exactly the rewritten paths: freeze independence, pushAll, splice in both
    overlap directions, a stable sort, and the unpack-based uncons/insertAt/
    deleteAt/updateAt. Verified locally with build, the regression run, and
    luacheck --std lua51 all green.
    Unisay committed Jun 14, 2026
    Configuration menu
    Copy the full SHA
    fb573d4 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #1 from purescript-lua/chore/agents-md-and-canon-ci

    feat: bring arrays to the canon and make the FFI Lua 5.1-safe
    Unisay authored Jun 14, 2026
    Configuration menu
    Copy the full SHA
    272db5c View commit details
    Browse the repository at this point in the history
  3. chore: add treefmt formatting (nix fmt) and format the tree

    Wire treefmt via treefmt-nix: nixfmt, dhall format, purs-tidy (.tidyrc.json)
    and LuaFormatter for the FFI (.lua-format, kept over StyLua because it
    preserves the parentheses pslua's parser needs). `nix fmt` formats; the dev
    shell installs a content-based pre-commit hook and CI runs
    `nix fmt && git diff --exit-code` (content-based, since the in-place
    formatters bump mtime and would trip treefmt --fail-on-change). Lua lines
    budget 130 cols, matching the raised `luacheck --max-line-length`. The bulk
    of the diff is the first format pass.
    Unisay committed Jun 14, 2026
    Configuration menu
    Copy the full SHA
    5c7c5e1 View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2026

  1. Merge pull request #2 from purescript-lua/chore/treefmt

    chore: add treefmt formatting (nix fmt + pre-commit + CI check)
    Unisay authored Jun 15, 2026
    Configuration menu
    Copy the full SHA
    de5d9d8 View commit details
    Browse the repository at this point in the history
  2. chore: harden pre-commit hook (tracked .githooks/ + core.hooksPath)

    Replace the dev-shell installer that wrote .git/hooks/pre-commit with a
    tracked .githooks/pre-commit wired via `git config core.hooksPath .githooks`.
    
    Fixes three issues with the old hook: it gated on `[ -d .git ]` (false in
    worktrees/submodules where .git is a file), it clobbered any existing
    .git/hooks/pre-commit on every `nix develop`, and `nix fmt … || exit 0`
    swallowed real formatter failures. The new hook skips only when `nix` is
    absent (CI is the authoritative gate) and otherwise blocks on a `nix fmt`
    failure or reformat.
    Unisay committed Jun 15, 2026
    Configuration menu
    Copy the full SHA
    40999d0 View commit details
    Browse the repository at this point in the history
  3. chore: bump pslua dev input to 62e3653

    Toolchain consistency: pin the pslua dev flake input to the current
    compiler main across the ecosystem. flake.lock only; the package set
    consumes sources + FFI, not this dev input, so no re-tag is needed.
    Unisay committed Jun 15, 2026
    Configuration menu
    Copy the full SHA
    f8794ec View commit details
    Browse the repository at this point in the history
  4. fix: correct ST unshiftAll/splice and NonEmpty traverse1 FFI

    Three Lua FFI bugs, each now guarded by a failing-then-passing regression
    test (test/regression/{array_st,nonempty}.lua):
    
    - unshiftAllImpl prepended via move() over the front slots, overwriting
      existing elements instead of shifting them right. Now shifts then copies.
      Fixes purescript-lua/purescript-lua#74.
    - spliceImpl only shifted the tail: it never inserted bs, never shrank on
      remove>insert, and returned the whole array instead of the removed slice.
      Now implements full JS splice semantics. Fixes purescript-lua/purescript-lua#75.
    - traverse1Impl's Cont/ConsCell were ported as 'this'-mutating procedures
      but called with data args only, erroring on first use. Now they return
      fresh tables. Fixes purescript-lua/purescript-lua#73.
    
    The pre-existing splice tests asserted the buggy move-only output; they are
    replaced with correct-semantics cases. Verified under Lua 5.1.
    Unisay committed Jun 15, 2026
    Configuration menu
    Copy the full SHA
    1579351 View commit details
    Browse the repository at this point in the history
Loading