Title: reduceTableDefinitionAccessor ignores TableRowKV rows and duplicate fields (folds to Nil) · Issue #140 · purescript-lua/purescript-lua · GitHub
Open Graph Title: reduceTableDefinitionAccessor ignores TableRowKV rows and duplicate fields (folds to Nil) · Issue #140 · purescript-lua/purescript-lua
X Title: reduceTableDefinitionAccessor ignores TableRowKV rows and duplicate fields (folds to Nil) · Issue #140 · purescript-lua/purescript-lua
Description: The Lua optimizer rule reduceTableDefinitionAccessor (lib/Language/PureScript/Backend/Lua/Optimizer.hs) rewrites { foo = 1, bar = 2 }.foo to 1, but it searches only TableRowNV rows and takes the first match via listToMaybe, falling back ...
Open Graph Description: The Lua optimizer rule reduceTableDefinitionAccessor (lib/Language/PureScript/Backend/Lua/Optimizer.hs) rewrites { foo = 1, bar = 2 }.foo to 1, but it searches only TableRowNV rows and takes the fi...
X Description: The Lua optimizer rule reduceTableDefinitionAccessor (lib/Language/PureScript/Backend/Lua/Optimizer.hs) rewrites { foo = 1, bar = 2 }.foo to 1, but it searches only TableRowNV rows and takes the fi...
Opengraph URL: https://github.com/purescript-lua/purescript-lua/issues/140
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"reduceTableDefinitionAccessor ignores TableRowKV rows and duplicate fields (folds to Nil)","articleBody":"The Lua optimizer rule `reduceTableDefinitionAccessor` (`lib/Language/PureScript/Backend/Lua/Optimizer.hs`) rewrites `{ foo = 1, bar = 2 }.foo` to `1`, but it searches only `TableRowNV` rows and takes the first match via `listToMaybe`, falling back to `Nil`.\n\nTwo latent hazards follow. If codegen ever emits a string key in KV form (`[\"foo\"] = 1`) for a field that is later accessed with `VarField`, the rule folds the access to `Nil` instead of the value. And on duplicate field names Lua's table constructor keeps the last occurrence while the rule returns the first.\n\nNeither shape is currently produced by the codegen, so this is hardening rather than a live miscompile: the rule should refuse to match when the constructor contains any `TableRowKV` row or duplicate field names.\n\nFound during the 2026-07-02 backend audit.\n","author":{"url":"https://github.com/Unisay","@type":"Person","name":"Unisay"},"datePublished":"2026-07-02T18:17:00Z","url":"https://github.com/purescript-lua/purescript-lua/issues/140"}
| 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:346bf357-25d7-b89f-7148-d22b32424298 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CB04:31E99C:730CB2:9BF8F8:6B00DB68 |
| html-safe-nonce | 6282aae8c3b0260dfb3daa4ee0652e6eacf537a74ab2d5e28243ecebc0ada58f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQjA0OjMxRTk5Qzo3MzBDQjI6OUJGOEY4OjZCMDBEQjY4IiwidmlzaXRvcl9pZCI6IjI4NTIwMzMyNjc2MDE4MjQ2MTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 819b7b734130fb168386ec6a7dd133313af571aefd5aece425d0beec6d8d88a9 |
| hovercard-subject-tag | issue:4797133487 |
| 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/140/issue_layout |
| twitter:image | https://opengraph.githubassets.com/91b3aade219248f1c1c76b075848cfd43b6d3198ebccbbf7753b7e23b7d395bb/purescript-lua/purescript-lua/issues/140 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/91b3aade219248f1c1c76b075848cfd43b6d3198ebccbbf7753b7e23b7d395bb/purescript-lua/purescript-lua/issues/140 |
| og:image:alt | The Lua optimizer rule reduceTableDefinitionAccessor (lib/Language/PureScript/Backend/Lua/Optimizer.hs) rewrites { foo = 1, bar = 2 }.foo to 1, but it searches only TableRowNV rows and takes the fi... |
| 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 | 043c3f30fbcbe2c6c8e729e10cbbbc90c406546f9fbbb67c648d38f6b7d16daf |
| turbo-cache-control | no-preview |
| go-import | github.com/purescript-lua/purescript-lua git https://github.com/purescript-lua/purescript-lua.git |
| octolytics-dimension-user_id | 131581790 |
| octolytics-dimension-user_login | purescript-lua |
| octolytics-dimension-repository_id | 587200487 |
| octolytics-dimension-repository_nwo | purescript-lua/purescript-lua |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 587200487 |
| octolytics-dimension-repository_network_root_nwo | purescript-lua/purescript-lua |
| 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 | 5425dc24e8bd8d6fca9641a12afc984825a43875 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width