Fix indexing in mapWithIndexArray and traverseArrayImpl#1
Closed
sarahnya wants to merge 1 commit into
Closed
Conversation
Changes are made such that lua arrays use the lua convention of 1 based indexing while purescript arrays use 0 based indexing.
Unisay
added a commit
that referenced
this pull request
Jun 14, 2026
Follows the merged traverse fix (#2 by @Renegatto). On top of it: - Fix mapWithIndexArray: it passed the 1-based Lua loop index to f, but PureScript mapWithIndex is 0-based, so f received i instead of i-1 (originally reported in #1 by @sarahnya). - Add a focused regression suite (test-regression/) run by scripts/test: traverse over Maybe is length/order-preserving at every size (>3 hits the pivot/append branch, which needs the Array Semigroup fix shipped in prelude v7.2.2), traverse over the Array applicative, and 0-based mapWithIndex. - Align tooling: purescript-overlay dev shell on Lua 5.1 (drops easy-ps / insecure nodejs), canonical nix CI replacing the bower workflow, fail-fast scripts, and bump the package set to psc-0.15.15-20260614 (prelude v7.2.2). Supersedes the earlier normalization PR #3. Closes #1
Collaborator
|
Thanks @sarahnya — both halves of this are now addressed. The |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the change
Changes are made such that lua arrays use the lua convention of 1 based indexing while purescript arrays use 0 based indexing.
Checklist: