Title: showNumberImpl uses Lua tostring — wrong format vs PureScript show (0.0, NaN, Infinity, exponents) · Issue #9 · purescript-lua/purescript-lua-prelude · GitHub
Open Graph Title: showNumberImpl uses Lua tostring — wrong format vs PureScript show (0.0, NaN, Infinity, exponents) · Issue #9 · purescript-lua/purescript-lua-prelude
X Title: showNumberImpl uses Lua tostring — wrong format vs PureScript show (0.0, NaN, Infinity, exponents) · Issue #9 · purescript-lua/purescript-lua-prelude
Description: Data/Show.lua showNumberImpl = tostring, but Lua 5.1 tostring does not match PureScript/JS show :: Number -> String: value PureScript show Lua tostring 0.0 0.0 0 500.0 500.0 500 1e10 10000000000.0 10000000000 1/0 Infinity inf -1/0 -Infin...
Open Graph Description: Data/Show.lua showNumberImpl = tostring, but Lua 5.1 tostring does not match PureScript/JS show :: Number -> String: value PureScript show Lua tostring 0.0 0.0 0 500.0 500.0 500 1e10 10000000000.0 ...
X Description: Data/Show.lua showNumberImpl = tostring, but Lua 5.1 tostring does not match PureScript/JS show :: Number -> String: value PureScript show Lua tostring 0.0 0.0 0 500.0 500.0 500 1e10 10000000000...
Opengraph URL: https://github.com/purescript-lua/purescript-lua-prelude/issues/9
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"showNumberImpl uses Lua tostring — wrong format vs PureScript show (0.0, NaN, Infinity, exponents)","articleBody":"`Data/Show.lua` `showNumberImpl = tostring`, but Lua 5.1 `tostring` does not match PureScript/JS `show :: Number -> String`:\n\n| value | PureScript show | Lua tostring |\n|---|---|---|\n| 0.0 | `0.0` | `0` |\n| 500.0 | `500.0` | `500` |\n| 1e10 | `10000000000.0` | `10000000000` |\n| 1/0 | `Infinity` | `inf` |\n| -1/0 | `-Infinity` | `-inf` |\n| 0/0 | `NaN` | `-nan` |\n\nSo integral Numbers lose the `.0`, and infinities/NaN print Lua spellings. This is the same class as the showString/showArray FFI divergences. It blocks reviving the upstream `testNumberShow` suite (test/Test/Main.purs), which asserts the PureScript formats.\n\nFix needs a formatter that adds `.0` for integral finite numbers and maps inf/nan to Infinity/-Infinity/NaN (mirroring the upstream JS show). Found while reviving the prelude test suite (closes-with-credit of #2 by @UnrelatedString).","author":{"url":"https://github.com/Unisay","@type":"Person","name":"Unisay"},"datePublished":"2026-06-14T10:24:50Z","url":"https://github.com/purescript-lua/purescript-lua-prelude/issues/9"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:079e444d-c056-ac3e-04f1-bb36e71dc195 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E3B8:3A159F:5E200:78483:6B00F213 |
| html-safe-nonce | 4546551663c61cb2474dd0491a04b924e1f5397efbc2f94a1b7a0588f2025abd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFM0I4OjNBMTU5Rjo1RTIwMDo3ODQ4Mzo2QjAwRjIxMyIsInZpc2l0b3JfaWQiOiI1NTk3MTA0NTM5MDE5ODMzODc1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | f1b2892cd33190315153a17ad8654d942676bc36c8b4e043aa775cda24952d3b |
| hovercard-subject-tag | issue:4658755649 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/purescript-lua/purescript-lua-prelude/9/issue_layout |
| twitter:image | https://opengraph.githubassets.com/66f5e6e17fb106c34259a4682d2901257c4c10219444ab8f4ce38ac570abdb5a/purescript-lua/purescript-lua-prelude/issues/9 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/66f5e6e17fb106c34259a4682d2901257c4c10219444ab8f4ce38ac570abdb5a/purescript-lua/purescript-lua-prelude/issues/9 |
| og:image:alt | Data/Show.lua showNumberImpl = tostring, but Lua 5.1 tostring does not match PureScript/JS show :: Number -> String: value PureScript show Lua tostring 0.0 0.0 0 500.0 500.0 500 1e10 10000000000.0 ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Unisay |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| turbo-cache-control | no-preview |
| go-import | github.com/purescript-lua/purescript-lua-prelude git https://github.com/purescript-lua/purescript-lua-prelude.git |
| octolytics-dimension-user_id | 131581790 |
| octolytics-dimension-user_login | purescript-lua |
| octolytics-dimension-repository_id | 620956647 |
| octolytics-dimension-repository_nwo | purescript-lua/purescript-lua-prelude |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 33838632 |
| octolytics-dimension-repository_parent_nwo | purescript/purescript-prelude |
| octolytics-dimension-repository_network_root_id | 33838632 |
| octolytics-dimension-repository_network_root_nwo | purescript/purescript-prelude |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width