René's URL Explorer Experiment


Title: fix: make `@inline never` actually prevent inlining (#131) by Unisay · Pull Request #132 · purescript-lua/purescript-lua · GitHub

Open Graph Title: fix: make `@inline never` actually prevent inlining (#131) by Unisay · Pull Request #132 · purescript-lua/purescript-lua

X Title: fix: make `@inline never` actually prevent inlining (#131) by Unisay · Pull Request #132 · purescript-lua/purescript-lua

Description: Summary @inline never parsed and was stored, but it never affected the optimizer, so the annotation was a no-op. Both inlining sites decided with isInlinableExpr expr || , and isInlinableExpr maps Just Never to the same result as Nothing. A never-annotated binding that was a reference, a small literal, or used exactly once was therefore still inlined through the second disjunct. The fix collects the never-annotated binding names once from the pristine module (neverInlineNames) and threads that set into optimizeModule, the top-level binding inliner, which refuses to inline any name in it. The veto is keyed by name rather than by re-reading the annotation, so it survives rewrites that drop the annotation off a binding's root (for example constant folding) and the idempotent optimization fixpoint. @inline pragmas only attach to top-level bindings, so that inliner is the only site the annotation reaches; the local let inliner is left unchanged. @inline always is unaffected. No golden uses @inline never, so generated output is unchanged for every existing test. Closes #131. How it was verified A new IR.Optimizer test builds an UberModule with a top-level binding foo = (1 == 1) annotated never, exported and used once. Constant folding rewrites the root to true, dropping the annotation, so the test specifically exercises the name-based veto: it asserts the optimizer keeps foo as a binding rather than inlining it away. Red before the fix (foo was inlined and dropped), green after. I also updated Note [Inline annotations and inlining heuristics], which previously documented the broken behavior. Checklist Added a changelog.d/ fragment for any user-facing change (scriv create in the dev shell), or this change ships nothing releasable (CI, docs, or an internal refactor). In the dev shell (nix develop), fourmolu -i lib/ exe/ test/ and hlint lib/ exe/ test/ are clean. In the dev shell, cabal test all passes; structural goldens were re-accepted on purpose if codegen moved (PSLUA_GOLDEN_ACCEPT=1), and eval/golden.txt still holds.

Open Graph Description: Summary @inline <name> never parsed and was stored, but it never affected the optimizer, so the annotation was a no-op. Both inlining sites decided with isInlinableExpr expr || <used once&...

X Description: Summary @inline &lt;name&gt; never parsed and was stored, but it never affected the optimizer, so the annotation was a no-op. Both inlining sites decided with isInlinableExpr expr || &l...

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

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:b637effb-384e-dedf-3903-b446ad44a775
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC138:229B2E:DF86FE:128172C:6B00FC98
html-safe-nonce9129a15ea2936787da1128ed93d667a8f9a95985a33b2ee6863683aa23269632
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTM4OjIyOUIyRTpERjg2RkU6MTI4MTcyQzo2QjAwRkM5OCIsInZpc2l0b3JfaWQiOiIzOTEyMTI1Nzk3MjA0Mjk0ODA4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacf64369fd394152e291b015cdb66d63057adf04e14a483ecf963ff38b50506ce0
hovercard-subject-tagpull_request:3937708075
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/132/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:altSummary @inline <name> never parsed and was stored, but it never affected the optimizer, so the annotation was a no-op. Both inlining sites decided with isInlinableExpr expr || <used once&...
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/132/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpurescript-lua%2Fpurescript-lua%2Fpull%2F132%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%2F132%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/132/files
Reloadhttps://github.com/purescript-lua/purescript-lua/pull/132/files
Reloadhttps://github.com/purescript-lua/purescript-lua/pull/132/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-131/inline-never-vetohttps://github.com/purescript-lua/purescript-lua/tree/issue-131/inline-never-veto
Conversation 10 https://github.com/purescript-lua/purescript-lua/pull/132
Commits 3 https://github.com/purescript-lua/purescript-lua/pull/132/commits
Checks 2 https://github.com/purescript-lua/purescript-lua/pull/132/checks
Files changed https://github.com/purescript-lua/purescript-lua/pull/132/files
Please reload this pagehttps://github.com/purescript-lua/purescript-lua/pull/132/files
fix: make @inline never actually prevent inlining (#131) https://github.com/purescript-lua/purescript-lua/pull/132/files#top
Show all changes 3 commits https://github.com/purescript-lua/purescript-lua/pull/132/files
27aeda2 fix: make @inline never actually prevent inlining (#131) Unisay Jun 25, 2026 https://github.com/purescript-lua/purescript-lua/pull/132/commits/27aeda2732e5f7d580369460a7bb8cb287743544
44e24ef fix: veto @inline never by name so it survives optimization (#132 rev… Unisay Jun 26, 2026 https://github.com/purescript-lua/purescript-lua/pull/132/commits/44e24efe80ff882331bfddfb4750f2e96958a0a5
30e32ff docs: clarify pragmas govern non-foreign bindings (#132 review) Unisay Jun 26, 2026 https://github.com/purescript-lua/purescript-lua/pull/132/commits/30e32ff451bc8d4d0dcf6bdac8cc2824f130b53d
Clear filters https://github.com/purescript-lua/purescript-lua/pull/132/files
Please reload this pagehttps://github.com/purescript-lua/purescript-lua/pull/132/files
Please reload this pagehttps://github.com/purescript-lua/purescript-lua/pull/132/files
20260625_210853_unisay_inline_never_veto.md https://github.com/purescript-lua/purescript-lua/pull/132/files#diff-08ae84286c013d6aec99f18138ee6299f47117f6d3640480ae8a285eb7e29b16
Inliner.hs https://github.com/purescript-lua/purescript-lua/pull/132/files#diff-88f05601faa8e18c6ea74b2f47a6e89ed662c05acf8ac019af8104727ae0d7ed
Optimizer.hs https://github.com/purescript-lua/purescript-lua/pull/132/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
Spec.hs https://github.com/purescript-lua/purescript-lua/pull/132/files#diff-241ea2421c606c31b9414fb386f9f4d1beb60055ed792935b393101edfd7b949
changelog.d/20260625_210853_unisay_inline_never_veto.mdhttps://github.com/purescript-lua/purescript-lua/pull/132/files#diff-08ae84286c013d6aec99f18138ee6299f47117f6d3640480ae8a285eb7e29b16
View file https://github.com/purescript-lua/purescript-lua/blob/30e32ff451bc8d4d0dcf6bdac8cc2824f130b53d/changelog.d/20260625_210853_unisay_inline_never_veto.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/purescript-lua/purescript-lua/pull/132/{{ revealButtonHref }}
lib/Language/PureScript/Backend/IR/Inliner.hshttps://github.com/purescript-lua/purescript-lua/pull/132/files#diff-88f05601faa8e18c6ea74b2f47a6e89ed662c05acf8ac019af8104727ae0d7ed
View file https://github.com/purescript-lua/purescript-lua/blob/30e32ff451bc8d4d0dcf6bdac8cc2824f130b53d/lib/Language/PureScript/Backend/IR/Inliner.hs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/purescript-lua/purescript-lua/pull/132/{{ revealButtonHref }}
https://github.com/purescript-lua/purescript-lua/pull/132/files#diff-88f05601faa8e18c6ea74b2f47a6e89ed662c05acf8ac019af8104727ae0d7ed
https://github.com/purescript-lua/purescript-lua/pull/132/files#diff-88f05601faa8e18c6ea74b2f47a6e89ed662c05acf8ac019af8104727ae0d7ed
lib/Language/PureScript/Backend/IR/Optimizer.hshttps://github.com/purescript-lua/purescript-lua/pull/132/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
View file https://github.com/purescript-lua/purescript-lua/blob/30e32ff451bc8d4d0dcf6bdac8cc2824f130b53d/lib/Language/PureScript/Backend/IR/Optimizer.hs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/purescript-lua/purescript-lua/pull/132/{{ revealButtonHref }}
https://github.com/purescript-lua/purescript-lua/pull/132/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
https://github.com/purescript-lua/purescript-lua/pull/132/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
https://github.com/purescript-lua/purescript-lua/pull/132/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
https://github.com/purescript-lua/purescript-lua/pull/132/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
Please reload this pagehttps://github.com/purescript-lua/purescript-lua/pull/132/files
Please reload this pagehttps://github.com/purescript-lua/purescript-lua/pull/132/files
https://github.com/purescript-lua/purescript-lua/pull/132/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
test/Language/PureScript/Backend/IR/Optimizer/Spec.hshttps://github.com/purescript-lua/purescript-lua/pull/132/files#diff-241ea2421c606c31b9414fb386f9f4d1beb60055ed792935b393101edfd7b949
View file https://github.com/purescript-lua/purescript-lua/blob/30e32ff451bc8d4d0dcf6bdac8cc2824f130b53d/test/Language/PureScript/Backend/IR/Optimizer/Spec.hs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/purescript-lua/purescript-lua/pull/132/{{ revealButtonHref }}
https://github.com/purescript-lua/purescript-lua/pull/132/files#diff-241ea2421c606c31b9414fb386f9f4d1beb60055ed792935b393101edfd7b949
https://github.com/purescript-lua/purescript-lua/pull/132/files#diff-241ea2421c606c31b9414fb386f9f4d1beb60055ed792935b393101edfd7b949
https://github.com/purescript-lua/purescript-lua/pull/132/files#diff-241ea2421c606c31b9414fb386f9f4d1beb60055ed792935b393101edfd7b949
Please reload this pagehttps://github.com/purescript-lua/purescript-lua/pull/132/files
https://github.com/purescript-lua/purescript-lua/pull/132/files#diff-241ea2421c606c31b9414fb386f9f4d1beb60055ed792935b393101edfd7b949
Please reload this pagehttps://github.com/purescript-lua/purescript-lua/pull/132/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.