Title: inlineLocalBindings substitutes at index 0 for every Standalone grouping, wrong with same-name Let siblings · Issue #141 · purescript-lua/purescript-lua · GitHub
Open Graph Title: inlineLocalBindings substitutes at index 0 for every Standalone grouping, wrong with same-name Let siblings · Issue #141 · purescript-lua/purescript-lua
X Title: inlineLocalBindings substitutes at index 0 for every Standalone grouping, wrong with same-name Let siblings · Issue #141 · purescript-lua/purescript-lua
Description: inlineLocalBindings (lib/Language/PureScript/Backend/IR/Optimizer.hs) folds over a Let's groupings with foldr and calls substitute (Local name) 0 for every Standalone binding. Index 0 is only correct for the binding whose binder is neare...
Open Graph Description: inlineLocalBindings (lib/Language/PureScript/Backend/IR/Optimizer.hs) folds over a Let's groupings with foldr and calls substitute (Local name) 0 for every Standalone binding. Index 0 is only corre...
X Description: inlineLocalBindings (lib/Language/PureScript/Backend/IR/Optimizer.hs) folds over a Let's groupings with foldr and calls substitute (Local name) 0 for every Standalone binding. Index 0 is only c...
Opengraph URL: https://github.com/purescript-lua/purescript-lua/issues/141
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"inlineLocalBindings substitutes at index 0 for every Standalone grouping, wrong with same-name Let siblings","articleBody":"`inlineLocalBindings` (`lib/Language/PureScript/Backend/IR/Optimizer.hs`) folds over a `Let`'s groupings with `foldr` and calls `substitute (Local name) 0` for every `Standalone` binding. Index 0 is only correct for the binding whose binder is nearest in the body; with same-name sibling bindings in one `Let` (allowed by Note [Sequential scoping of Let bindings]) the earlier sibling's references sit at index 1 and are missed, and references inside an inlinee to a name rebound by a later sibling get captured by the wrong binder.\n\nSame-name siblings cannot currently be produced from PureScript source (source let-blocks have unique names; generated names are fresh), so this is a latent landmine in the same class as the body-scope defect in #134.\n\nExpected resolution: this dies by construction under the GUC redesign (#139), where all local binders are unique before the optimizer runs. Filing it separately so the hazard is on record in case inlining changes land before #139; if #139 lands first, close this with a regression test.\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:18Z","url":"https://github.com/purescript-lua/purescript-lua/issues/141"}
| 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:9743ec8e-831d-0d8e-ccec-445dffb5f2f1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ABB2:DB09F:AB92AD:DC440E:6B00F82E |
| html-safe-nonce | 5e55b57b2d5d3fe8be1988c1eb1f2a74f4c26fff9ff14493d5a6f09aca49281e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQkIyOkRCMDlGOkFCOTJBRDpEQzQ0MEU6NkIwMEY4MkUiLCJ2aXNpdG9yX2lkIjoiNzg3NjYzNDk2MzY3MDUzMDA5NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c2b25886b029a93012f0ff841f7f7a12a2fd3d62f35b93d72801cb1f63406080 |
| hovercard-subject-tag | issue:4797135394 |
| 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/141/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c09adfd68f4498e3807efab71d51244bce5d81c6772277dfc733b357440522ee/purescript-lua/purescript-lua/issues/141 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c09adfd68f4498e3807efab71d51244bce5d81c6772277dfc733b357440522ee/purescript-lua/purescript-lua/issues/141 |
| og:image:alt | inlineLocalBindings (lib/Language/PureScript/Backend/IR/Optimizer.hs) folds over a Let's groupings with foldr and calls substitute (Local name) 0 for every Standalone binding. Index 0 is only corre... |
| 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 | e208d86428ec00a57ade75058166297440e8128a01e5287c31a53dc042bbf187 |
| 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 | 7dafd017fb7809a839c443dba08622af38e63c09 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width