René's URL Explorer Experiment


Title: fix: unshift dropped Let binders and resolve body scope per let* in IR DCE by Unisay · Pull Request #148 · purescript-lua/purescript-lua · GitHub

Open Graph Title: fix: unshift dropped Let binders and resolve body scope per let* in IR DCE by Unisay · Pull Request #148 · purescript-lua/purescript-lua

X Title: fix: unshift dropped Let binders and resolve body scope per let* in IR DCE by Unisay · Pull Request #148 · purescript-lua/purescript-lua

Description: Closes #134. Two defects in the Let handling of Language.PureScript.Backend.IR.DCE, both of the De Bruijn bookkeeping class of #37 and #56. The first: dropping a dead binding from a Let removed a slot from that name's De Bruijn namespace without lowering the references that skipped over it, unlike the Abs case (fixed in #56). A dangling reference either crashed the Lua codegen with UnexpectedRefBound or silently resolved to the wrong binder. The Let case of dceAnnotatedExp now walks the groupings left to right and, for every dropped binder, unshifts the rest of the Let (later grouping RHSs and the body). Rather than re-implementing the scope threading, the fix reuses the unshift traversal by wrapping the remainder back into a Let, so the bookkeeping follows Note [Sequential scoping of Let bindings] by construction. Dead recursive-group members get the same treatment. The second: the scope the Let body was resolved against in adjacencyListForExpr was built with a foldr, putting the first binding of a name at index 0 where the let* convention requires the last. Reachability thus marked the wrong binding live among same-name siblings. The body now uses the same scope that adjacencyListForGrouping threads through the groupings one line below. Four regression tests were written red first: body scope resolution among same-name siblings, unshift of the body after dropping a dead shadowing binder, unshift of later sibling RHSs, and unshift after dropping a dead recursive-group member. Both defects are latent on the current corpus, and the fix produces no golden churn: same-name Let siblings cannot be produced from source today, and the dangling-reference path needs an inliner-created shadowing binder whose uses later die. An end-to-end golden can follow once a source-level reproduction for that path is pinned down, as noted in the issue.

Open Graph Description: Closes #134. Two defects in the Let handling of Language.PureScript.Backend.IR.DCE, both of the De Bruijn bookkeeping class of #37 and #56. The first: dropping a dead binding from a Let removed a s...

X Description: Closes #134. Two defects in the Let handling of Language.PureScript.Backend.IR.DCE, both of the De Bruijn bookkeeping class of #37 and #56. The first: dropping a dead binding from a Let removed a s...

Opengraph URL: https://github.com/purescript-lua/purescript-lua/pull/148

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:69d4ef89-cb47-1ba7-1951-d13947551340
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8688:DB09F:B052F8:E24750:6B00F9D4
html-safe-nonce9201e48fa8e86dffec22d71f9eeff271a8a16bd49f05f57a7219297ec1eda30b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Njg4OkRCMDlGOkIwNTJGODpFMjQ3NTA6NkIwMEY5RDQiLCJ2aXNpdG9yX2lkIjoiNzc3NDczNjYzNjkzOTY2MzgyOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacdb830d873e760cee4aae70d26b7bb9f99afef831d3827bb3afa39722cd1c1b39
hovercard-subject-tagpull_request:3981782366
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/purescript-lua/purescript-lua/pull/148/files
twitter:imagehttps://avatars.githubusercontent.com/u/1009751?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1009751?s=400&v=4
og:image:altCloses #134. Two defects in the Let handling of Language.PureScript.Backend.IR.DCE, both of the De Bruijn bookkeeping class of #37 and #56. The first: dropping a dead binding from a Let removed a s...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonee208d86428ec00a57ade75058166297440e8128a01e5287c31a53dc042bbf187
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/purescript-lua/purescript-lua git https://github.com/purescript-lua/purescript-lua.git
octolytics-dimension-user_id131581790
octolytics-dimension-user_loginpurescript-lua
octolytics-dimension-repository_id587200487
octolytics-dimension-repository_nwopurescript-lua/purescript-lua
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id587200487
octolytics-dimension-repository_network_root_nwopurescript-lua/purescript-lua
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7dafd017fb7809a839c443dba08622af38e63c09
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/purescript-lua/purescript-lua/pull/148/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpurescript-lua%2Fpurescript-lua%2Fpull%2F148%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpurescript-lua%2Fpurescript-lua%2Fpull%2F148%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=purescript-lua%2Fpurescript-lua
Reloadhttps://github.com/purescript-lua/purescript-lua/pull/148/files
Reloadhttps://github.com/purescript-lua/purescript-lua/pull/148/files
Reloadhttps://github.com/purescript-lua/purescript-lua/pull/148/files
purescript-luahttps://github.com/purescript-lua
purescript-luahttps://github.com/purescript-lua/purescript-lua
Codehttps://github.com/purescript-lua/purescript-lua
Issues48 (48)https://github.com/purescript-lua/purescript-lua/issues
Pull requestshttps://github.com/purescript-lua/purescript-lua/pulls
Discussionshttps://github.com/purescript-lua/purescript-lua/discussions
Actionshttps://github.com/purescript-lua/purescript-lua/actions
Projectshttps://github.com/purescript-lua/purescript-lua/projects
Security and qualityhttps://github.com/purescript-lua/purescript-lua/security
Insightshttps://github.com/purescript-lua/purescript-lua/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fpurescript-lua%2Fpurescript-lua%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpurescript-lua%2Fpurescript-lua%2Fissues%2Fnew%2Fchoose
Unisayhttps://github.com/Unisay
mainhttps://github.com/purescript-lua/purescript-lua/tree/main
issue-134/dce-let-scopehttps://github.com/purescript-lua/purescript-lua/tree/issue-134/dce-let-scope
Conversation 1 https://github.com/purescript-lua/purescript-lua/pull/148
Commits 1 https://github.com/purescript-lua/purescript-lua/pull/148/commits
Checks 2 https://github.com/purescript-lua/purescript-lua/pull/148/checks
Files changed https://github.com/purescript-lua/purescript-lua/pull/148/files
Please reload this pagehttps://github.com/purescript-lua/purescript-lua/pull/148/files
fix: unshift dropped Let binders and resolve body scope per let* in IR DCE https://github.com/purescript-lua/purescript-lua/pull/148/files#top
Show all changes 1 commit https://github.com/purescript-lua/purescript-lua/pull/148/files
dde6ac7 fix: unshift dropped Let binders and resolve body scope per let* in I… Unisay Jul 2, 2026 https://github.com/purescript-lua/purescript-lua/pull/148/commits/dde6ac7004af5b8c19530d2c598bfaaa5224a2ab
Clear filters https://github.com/purescript-lua/purescript-lua/pull/148/files
Please reload this pagehttps://github.com/purescript-lua/purescript-lua/pull/148/files
Please reload this pagehttps://github.com/purescript-lua/purescript-lua/pull/148/files
20260702_130000_unisay_dce_let_scope.md https://github.com/purescript-lua/purescript-lua/pull/148/files#diff-df4d3cf2a0e8e4d84274452bd37b4ee4dae4898fbda4eb136835a89128a343ff
DCE.hs https://github.com/purescript-lua/purescript-lua/pull/148/files#diff-a109a10f5eb1daf399873d5f872423b876fe04a88668660f01506076cefe8f78
Spec.hs https://github.com/purescript-lua/purescript-lua/pull/148/files#diff-65198fee01b184497bda5bc384f6f9ca56ea758b20a66b44e6017bb5f832ef2d
changelog.d/20260702_130000_unisay_dce_let_scope.mdhttps://github.com/purescript-lua/purescript-lua/pull/148/files#diff-df4d3cf2a0e8e4d84274452bd37b4ee4dae4898fbda4eb136835a89128a343ff
View file https://github.com/purescript-lua/purescript-lua/blob/dde6ac7004af5b8c19530d2c598bfaaa5224a2ab/changelog.d/20260702_130000_unisay_dce_let_scope.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/purescript-lua/purescript-lua/pull/148/{{ revealButtonHref }}
lib/Language/PureScript/Backend/IR/DCE.hshttps://github.com/purescript-lua/purescript-lua/pull/148/files#diff-a109a10f5eb1daf399873d5f872423b876fe04a88668660f01506076cefe8f78
View file https://github.com/purescript-lua/purescript-lua/blob/dde6ac7004af5b8c19530d2c598bfaaa5224a2ab/lib/Language/PureScript/Backend/IR/DCE.hs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/purescript-lua/purescript-lua/pull/148/{{ revealButtonHref }}
https://github.com/purescript-lua/purescript-lua/pull/148/files#diff-a109a10f5eb1daf399873d5f872423b876fe04a88668660f01506076cefe8f78
https://github.com/purescript-lua/purescript-lua/pull/148/files#diff-a109a10f5eb1daf399873d5f872423b876fe04a88668660f01506076cefe8f78
https://github.com/purescript-lua/purescript-lua/pull/148/files#diff-a109a10f5eb1daf399873d5f872423b876fe04a88668660f01506076cefe8f78
https://github.com/purescript-lua/purescript-lua/pull/148/files#diff-a109a10f5eb1daf399873d5f872423b876fe04a88668660f01506076cefe8f78
test/Language/PureScript/Backend/IR/DCE/Spec.hshttps://github.com/purescript-lua/purescript-lua/pull/148/files#diff-65198fee01b184497bda5bc384f6f9ca56ea758b20a66b44e6017bb5f832ef2d
View file https://github.com/purescript-lua/purescript-lua/blob/dde6ac7004af5b8c19530d2c598bfaaa5224a2ab/test/Language/PureScript/Backend/IR/DCE/Spec.hs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/purescript-lua/purescript-lua/pull/148/{{ revealButtonHref }}
https://github.com/purescript-lua/purescript-lua/pull/148/files#diff-65198fee01b184497bda5bc384f6f9ca56ea758b20a66b44e6017bb5f832ef2d
https://github.com/purescript-lua/purescript-lua/pull/148/files#diff-65198fee01b184497bda5bc384f6f9ca56ea758b20a66b44e6017bb5f832ef2d
https://github.com/purescript-lua/purescript-lua/pull/148/files#diff-65198fee01b184497bda5bc384f6f9ca56ea758b20a66b44e6017bb5f832ef2d
https://github.com/purescript-lua/purescript-lua/pull/148/files#diff-65198fee01b184497bda5bc384f6f9ca56ea758b20a66b44e6017bb5f832ef2d
Please reload this pagehttps://github.com/purescript-lua/purescript-lua/pull/148/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.