René's URL Explorer Experiment


Title: Note [Sequential scoping of Let bindings] omits freshenBinders and alphaKey from its list of implementors · Issue #354 · purescript-lua/purescript-lua · GitHub

Open Graph Title: Note [Sequential scoping of Let bindings] omits freshenBinders and alphaKey from its list of implementors · Issue #354 · purescript-lua/purescript-lua

X Title: Note [Sequential scoping of Let bindings] omits freshenBinders and alphaKey from its list of implementors · Issue #354 · purescript-lua/purescript-lua

Description: Problem pslua records how local bindings inside a Let resolve — sequentially, like Scheme's let* — as a GHC-style Note [Sequential scoping of Let bindings] in lib/Language/PureScript/Backend/IR/Types.hs. A Note is a named block comment t...

Open Graph Description: Problem pslua records how local bindings inside a Let resolve — sequentially, like Scheme's let* — as a GHC-style Note [Sequential scoping of Let bindings] in lib/Language/PureScript/Backend/IR/Typ...

X Description: Problem pslua records how local bindings inside a Let resolve — sequentially, like Scheme's let* — as a GHC-style Note [Sequential scoping of Let bindings] in lib/Language/PureScript/Backend/IR...

Opengraph URL: https://github.com/purescript-lua/purescript-lua/issues/354

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Note [Sequential scoping of Let bindings] omits freshenBinders and alphaKey from its list of implementors","articleBody":"## Problem\n\n`pslua` records how local bindings inside a `Let` resolve — sequentially, like Scheme's `let*` — as a GHC-style `Note [Sequential scoping of Let bindings]` in `lib/Language/PureScript/Backend/IR/Types.hs`. A `Note` is a named block comment that other sites reference by name instead of restating the rationale.\n\nThis Note is load-bearing rather than descriptive. It states that every traversal walking under `Let` binders while duplicate names can still occur must implement the convention, and that they must all agree — then enumerates the implementors:\n\n```\n  * 'countFreeRefs' threads the scope through the groupings left to right;\n\n  * 'alphaEq' resolves names to binder positions the same way, so it\n    stays correct on shadowed input;\n\n  * the well-scopedness lint\n    ('Language.PureScript.Backend.IR.Linter.unboundLocals' — ...)\n    tracks bound names the same way;\n\n  * 'qualifyTopRefs' (Linker, ahead of the optimizer pipeline) decides\n    whether a local reference escapes to a top-level binding by\n    threading bound names the same way;\n\n  * 'Language.PureScript.Backend.IR.Uniquify.uniquifyNamesInExpr'\n    resolves names to fresh, site-wide unique names the same way, ...\n```\n\nTwo further traversals now implement the same rule and appear nowhere in that list:\n\n- `freshenBinders` (`Language.PureScript.Backend.IR.Optimizer`), the helper that renames a `Let`'s binders when a rewrite needs fresh names — corrected in #345 to walk the binders in scope order;\n- `alphaKey`, the function that computes the alpha-equivalence key used by common-subexpression elimination — corrected in #349 to key a `Let`'s binders in scope order.\n\nBoth reference the Note from their own Haddock, so the link runs one way only: a reader standing at the Note cannot see them. Since the list reads as exhaustive (\"they must all agree\"), the omission actively misleads — the next change to a scoping-sensitive traversal consults the Note, finds five implementors, and misses two.\n\nThis family has now produced three defects: #37, where an optimizer traversal resolved a sibling-bound reference against the wrong binder, DCE deleted the \"unused\" binder, and codegen emitted a dangling Lua variable (the Note cites it); then #345; then #349. The Note is the artifact meant to prevent the fourth.\n\n## Approach\n\nAdd the two missing implementors to the Note's bullet list, each with a one-clause statement of what it threads, in the style of the existing entries.\n\nAlso attach the obligation explicitly: a traversal that implements this convention must be listed here. Today the list is only implicitly exhaustive, which is why two additions slipped past it — stating the rule makes the omission a reviewable defect rather than an oversight.\n\nThe change edits a single comment block, so it is small enough to ride along in the next PR that touches a scoping-sensitive traversal instead of taking a cycle of its own.\n\n## Prerequisites / Relations\n\nNone. Follows #345 and #349, whose fixes created the omission.\n\n## Verification / Measurement\n\nEvery site whose Haddock claims to implement the convention appears in the Note's list. Documentation only — behaviour is already pinned by the golden test `test/ps/src/Golden/Issue37/Test.purs` and the \"Let sequential (let*) scoping\" tests, so this adds no test of its own.\n","author":{"url":"https://github.com/Unisay","@type":"Person","name":"Unisay"},"datePublished":"2026-07-29T12:55:22Z","url":"https://github.com/purescript-lua/purescript-lua/issues/354"}

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/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:feb1ab71-665a-c49e-804f-b000d6db9abf
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE9E2:EA09B:6E08F3:93E65F:6B00D951
html-safe-nonce4feecb25760df419b20b506856fd559455e49b02688908d99da4ea24ad2e1755
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOUUyOkVBMDlCOjZFMDhGMzo5M0U2NUY6NkIwMEQ5NTEiLCJ2aXNpdG9yX2lkIjoiNjEyNTA4NjQyNzc5MDIzNTk4NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacd69eab43f652945e1dc0cbacfafa313ee3c4fe2d23e28bfe4934a4df51232eb1
hovercard-subject-tagissue:5009475069
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/purescript-lua/purescript-lua/354/issue_layout
twitter:imagehttps://opengraph.githubassets.com/7000934ff0e7695e4bbfe1c80ff5ba5eb50b341f3791cb6a10b12b76e6ae8317/purescript-lua/purescript-lua/issues/354
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/7000934ff0e7695e4bbfe1c80ff5ba5eb50b341f3791cb6a10b12b76e6ae8317/purescript-lua/purescript-lua/issues/354
og:image:altProblem pslua records how local bindings inside a Let resolve — sequentially, like Scheme's let* — as a GHC-style Note [Sequential scoping of Let bindings] in lib/Language/PureScript/Backend/IR/Typ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameUnisay
hostnamegithub.com
expected-hostnamegithub.com
Nonea481f62a1e04c9b9bdcb5628230682c66d59006f5b13b080f79cba84a176905b
turbo-cache-controlno-preview
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release84c8c5cc25e2fb7f2308428458538436baecc6d2
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/purescript-lua/purescript-lua/issues/354#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpurescript-lua%2Fpurescript-lua%2Fissues%2F354
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%2Fissues%2F354
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=purescript-lua%2Fpurescript-lua
Reloadhttps://github.com/purescript-lua/purescript-lua/issues/354
Reloadhttps://github.com/purescript-lua/purescript-lua/issues/354
Reloadhttps://github.com/purescript-lua/purescript-lua/issues/354
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
https://github.com/purescript-lua/purescript-lua
New issuehttps://github.com/login?return_to=https://github.com/purescript-lua/purescript-lua/issues/354
New issuehttps://github.com/login?return_to=https://github.com/purescript-lua/purescript-lua/issues/354
Note [Sequential scoping of Let bindings] omits freshenBinders and alphaKey from its list of implementorshttps://github.com/purescript-lua/purescript-lua/issues/354#top
area: irIR / optimizer / DCE / inlinerhttps://github.com/purescript-lua/purescript-lua/issues?q=state%3Aopen%20label%3A%22area%3A%20ir%22
choreMaintenance / infrastructurehttps://github.com/purescript-lua/purescript-lua/issues?q=state%3Aopen%20label%3A%22chore%22
https://github.com/Unisay
Unisayhttps://github.com/Unisay
on Jul 29, 2026https://github.com/purescript-lua/purescript-lua/issues/354#issue-5009475069
freshenBinders renames a free reference sharing its Standalone Let binder's name #345https://github.com/purescript-lua/purescript-lua/issues/345
CSE alphaKey hoists a Let's binders into its rename map, missing alpha-equivalent keys #349https://github.com/purescript-lua/purescript-lua/issues/349
#37https://github.com/purescript-lua/purescript-lua/issues/37
#345https://github.com/purescript-lua/purescript-lua/issues/345
#349https://github.com/purescript-lua/purescript-lua/issues/349
#345https://github.com/purescript-lua/purescript-lua/issues/345
#349https://github.com/purescript-lua/purescript-lua/issues/349
Unisayhttps://github.com/Unisay
area: irIR / optimizer / DCE / inlinerhttps://github.com/purescript-lua/purescript-lua/issues?q=state%3Aopen%20label%3A%22area%3A%20ir%22
choreMaintenance / infrastructurehttps://github.com/purescript-lua/purescript-lua/issues?q=state%3Aopen%20label%3A%22chore%22
on Jul 29, 2026https://github.com/purescript-lua/purescript-lua/issues/354#event-28660950109
Sign up for freehttps://github.com/signup?return_to=https://github.com/purescript-lua/purescript-lua/issues/354
Sign in to commenthttps://github.com/login?return_to=https://github.com/purescript-lua/purescript-lua/issues/354
area: irIR / optimizer / DCE / inlinerhttps://github.com/purescript-lua/purescript-lua/issues?q=state%3Aopen%20label%3A%22area%3A%20ir%22
choreMaintenance / infrastructurehttps://github.com/purescript-lua/purescript-lua/issues?q=state%3Aopen%20label%3A%22chore%22
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.