-
Notifications
You must be signed in to change notification settings - Fork 17
Comparing changes
Open a pull request
base repository: purescript/purescript-numbers
base: master
head repository: purescript-lua/purescript-lua-numbers
compare: master
- 17 commits
- 27 files changed
- 3 contributors
Commits on Mar 31, 2024
-
Configuration menu - View commit details
-
Copy full SHA for bbcec5d - Browse repository at this point
Copy the full SHA bbcec5dView commit details
Commits on Jun 14, 2026
-
fix: use bound argument n in Format.lua FFI instead of unbound number
The native formatting functions in src/Data/Number/Format.lua passed an unbound variable `number` to string.format while the actual Number argument was bound as `n`. At runtime `number` resolved to a nil global, so toPrecisionNative/toFixedNative/toExponentialNative errored instead of formatting their input. Reference each function's real argument `n`. Closes purescript-lua#1
Configuration menu - View commit details
-
Copy full SHA for c63dec6 - Browse repository at this point
Copy the full SHA c63dec6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 61f141b - Browse repository at this point
Copy the full SHA 61f141bView commit details -
Merge pull request #2 from Unisay/fix/numbers-format
fix: use bound argument n in Format.lua FFI instead of unbound number
Configuration menu - View commit details
-
Copy full SHA for 8226836 - Browse repository at this point
Copy the full SHA 8226836View commit details -
Configuration menu - View commit details
-
Copy full SHA for de270c9 - Browse repository at this point
Copy the full SHA de270c9View commit details -
chore: harden CI per review (drop accept-flake-config, fail-fast scri…
…pts/build, run test via bash)
Configuration menu - View commit details
-
Copy full SHA for 3b07ea9 - Browse repository at this point
Copy the full SHA 3b07ea9View commit details -
Merge pull request #4 from Unisay/chore/align-overlay
chore: normalize build tooling (purescript-overlay, nix CI, Lua 5.1)
Configuration menu - View commit details
-
Copy full SHA for 213598c - Browse repository at this point
Copy the full SHA 213598cView commit details -
chore: add AGENTS.md + CLAUDE.md, drop dead JavaScript-era files
AGENTS.md is the single instruction file the coding agents read natively; CLAUDE.md is a one-line @AGENTS.md import so Claude Code shares it. Also removes dead bower.json/package.json/.eslintrc.json. CI is already on the shared canon; no src/ change.
Configuration menu - View commit details
-
Copy full SHA for 66c3222 - Browse repository at this point
Copy the full SHA 66c3222View commit details -
Merge pull request #5 from Unisay/chore/agents-md-and-canon-ci
chore: add AGENTS.md, drop dead JavaScript-era files
Configuration menu - View commit details
-
Copy full SHA for 7d5a65b - Browse repository at this point
Copy the full SHA 7d5a65bView commit details -
chore: point pslua + package-set links at purescript-lua org
Repos moved from Unisay/* to the purescript-lua org. Update the pslua flake input and lockfile owner (same rev 94c13ce), the packages.dhall upstream-lua release URL, and the AGENTS.md links, so nothing relies on the old-owner redirect.
Configuration menu - View commit details
-
Copy full SHA for b35757b - Browse repository at this point
Copy the full SHA b35757bView commit details -
Merge pull request #6 from purescript-lua/chore/migrate-org-links
chore: point pslua + package-set links at purescript-lua org
Configuration menu - View commit details
-
Copy full SHA for 4a2884d - Browse repository at this point
Copy the full SHA 4a2884dView commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for d7660d2 - Browse repository at this point
Copy the full SHA d7660d2View commit details
Commits on Jun 15, 2026
-
Merge pull request #7 from purescript-lua/chore/treefmt
chore: add treefmt formatting (nix fmt + pre-commit + CI check)
Configuration menu - View commit details
-
Copy full SHA for e6a5a92 - Browse repository at this point
Copy the full SHA e6a5a92View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 5585574 - Browse repository at this point
Copy the full SHA 5585574View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 1d48c65 - Browse repository at this point
Copy the full SHA 1d48c65View commit details -
fix: toFixedNative uses %f, not %d (was truncating floats)
string.format("%.<d>d", n) is integer formatting, so toFixed dropped the fractional part (e.g. toFixed 2 3.14159 -> garbage). Use %f for fixed-point decimals. Fixes purescript-lua#3. Verified under Lua 5.1 (3.14159->3.14, 3.7@0->4, 2.5@3->2.500, 10@2->10.00).Configuration menu - View commit details
-
Copy full SHA for 5eb47a2 - Browse repository at this point
Copy the full SHA 5eb47a2View commit details -
fix: Data.Number / Data.Number.Format FFI match the JS contract
Aligns the FFI with the modules' own docstrings (the JS Number semantics): - toPrecisionNative used %f (d digits after the point); JS toPrecision is d SIGNIFICANT digits, so it was wrong for every input and destroyed small magnitudes (precision 3 of 0.000123456 gave "0.000"). Now uses %g. - fromStringImpl wrapped tonumber's nil in Just on a parse failure (a Just Number holding nil) and ignored the supplied isFinite predicate. It now extracts a leading numeric prefix (matching parseFloat's tolerance of a whitespace prefix and trailing junk, e.g. " 1.2 ??" -> Just 1.2), guards the parse, and uses isFinite, so "bad"/"" -> Nothing. - sign encoded the result through the boolean condition, so sign 0 returned the boolean `true` instead of the Number 0. Now uses explicit branches. - max/min folded with Lua's >/< which drop NaN, so e.g. max 1 NaN gave 1; JS Math.max/min return NaN if either argument is NaN. Added a NaN guard. - toExponentialNative emitted C's zero-padded exponent (1.23e+03); JS uses the minimal exponent width (1.23e+3). Strips one leading exponent zero. - toString spelled the specials "inf"/"-inf"/"nan"; now "Infinity"/ "-Infinity"/"NaN". (Finite values keep Lua's %.14g formatting — the JS shortest-round-trip form is out of scope; see #99 / accepted divergences.) Extends test/regression/format.lua and adds test/regression/number.lua. Fixes purescript-lua/purescript-lua#92 Fixes purescript-lua/purescript-lua#93 Fixes purescript-lua/purescript-lua#94 Fixes purescript-lua/purescript-lua#95 Fixes purescript-lua/purescript-lua#96 Fixes purescript-lua/purescript-lua#97 Fixes purescript-lua/purescript-lua#98
Configuration menu - View commit details
-
Copy full SHA for d27efeb - Browse repository at this point
Copy the full SHA d27efebView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff master...master