René's URL Explorer Experiment


Title: Fold ObjectProp field reads over known constructors (#213) by Unisay · Pull Request #215 · purescript-lua/purescript-lua · GitHub

Open Graph Title: Fold ObjectProp field reads over known constructors (#213) by Unisay · Pull Request #215 · purescript-lua/purescript-lua

X Title: Fold ObjectProp field reads over known constructors (#213) by Unisay · Pull Request #215 · purescript-lua/purescript-lua

Description: Closes #213. What Constructor field access reaches the IR as an ObjectProp record projection, ObjectProp (Ref v) (PropName "value0"), not as DataArgumentByIndex. That is the shape the generated bind/map/maybe workers actually contain. Nothing folded it: reduceObjectProp handles record literals and updates only (#153), and the case-of-known-constructor folds of #177 cover the DataArgumentByIndex field-read form. So (Just 7).value0 was left standing even with the constructor syntactically in place. How This adds one case to reduceKnownConstructor: ObjectProp (K a₁ … aₙ) "valueᵢ" over a saturated constructor application folds to aᵢ. The projection label maps to its positional argument through the constructor's declared field names (value0, value1, …, the row keys the Lua backend emits for a Ctor), so a label that is not one of them is declined rather than guessed. It reuses the discipline already established for the DataArgumentByIndex fold: discarded arguments are dropped rather than evaluated or duplicated, and the folded value carries the read node's own annotation, not the field's (the leak care behind reduceObjectProp). Why now This is a prerequisite for #180 (budgeted dictionary-method inlining). Once a method is inlined and its constructor argument is in place, the payload reads it through exactly this ObjectProp shape; without this fold the inliner would inline but the projection would not collapse. #214 (case-of-known-constructor through a let) stacks on this branch, and #180 stacks on #214. Verification New optimizer specs mirror the #177 coverage for the projection form: saturated sum and product reads, the sibling-rule cascade, the partial-application and absent-label declines, the discarded-argument drop, and the two annotation-leak guards. A randomized property stresses the discard semantics across arbitrary arity, algebraic type, and argument content. Full suite green (cabal test all): 695 examples, 0 failures. No structural golden moved and no eval oracle moved, which matches the near-zero standalone impact the issue predicts, since the shape barely occurs before method inlining lands. fourmolu and hlint are clean and the build is warning-free.

Open Graph Description: Closes #213. What Constructor field access reaches the IR as an ObjectProp record projection, ObjectProp (Ref v) (PropName "value0"), not as DataArgumentByIndex. That is the shape the gen...

X Description: Closes #213. What Constructor field access reaches the IR as an ObjectProp record projection, ObjectProp (Ref v) (PropName "value0"), not as DataArgumentByIndex. That is the shape...

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

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:8009006d-7e16-c600-d344-ada5fb6c7efe
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8F62:842EC:A71E91:E06953:6B00EFB8
html-safe-noncee7d3708b81bc3de61737b3c3eec2db6e4809f1e75da4e983e101b14b23f8a642
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RjYyOjg0MkVDOkE3MUU5MTpFMDY5NTM6NkIwMEVGQjgiLCJ2aXNpdG9yX2lkIjoiNjY3MTEwNjUwOTE4ODk1MTk5MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac1d6127318745c30c099398ff51d23f67172b3185d1846fc5c0440ad87bd63d6e
hovercard-subject-tagpull_request:4020750930
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/215/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 #213. What Constructor field access reaches the IR as an ObjectProp record projection, ObjectProp (Ref v) (PropName "value0"), not as DataArgumentByIndex. That is the shape the gen...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc
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
release9983dd5da06943f833c971dd5b6bc988e2858be5
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/purescript-lua/purescript-lua/pull/215/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpurescript-lua%2Fpurescript-lua%2Fpull%2F215%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%2F215%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/215/files
Reloadhttps://github.com/purescript-lua/purescript-lua/pull/215/files
Reloadhttps://github.com/purescript-lua/purescript-lua/pull/215/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-213/objectprop-ctor-foldhttps://github.com/purescript-lua/purescript-lua/tree/issue-213/objectprop-ctor-fold
Conversation 1 https://github.com/purescript-lua/purescript-lua/pull/215
Commits 1 https://github.com/purescript-lua/purescript-lua/pull/215/commits
Checks 2 https://github.com/purescript-lua/purescript-lua/pull/215/checks
Files changed https://github.com/purescript-lua/purescript-lua/pull/215/files
Please reload this pagehttps://github.com/purescript-lua/purescript-lua/pull/215/files
Fold ObjectProp field reads over known constructors (#213) https://github.com/purescript-lua/purescript-lua/pull/215/files#top
Show all changes 1 commit https://github.com/purescript-lua/purescript-lua/pull/215/files
4f9971c feat: fold ObjectProp field reads over known constructors (#213) Unisay Jul 9, 2026 https://github.com/purescript-lua/purescript-lua/pull/215/commits/4f9971c699d85aac8f142436e0671d1141b6332e
Clear filters https://github.com/purescript-lua/purescript-lua/pull/215/files
Please reload this pagehttps://github.com/purescript-lua/purescript-lua/pull/215/files
Please reload this pagehttps://github.com/purescript-lua/purescript-lua/pull/215/files
20260709_110442_unisay_objectprop_ctor_fold.md https://github.com/purescript-lua/purescript-lua/pull/215/files#diff-092b6821555c7dd2d760f3f2354d752834a7f429bf6852318fed3321a5df3a65
Optimizer.hs https://github.com/purescript-lua/purescript-lua/pull/215/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
Spec.hs https://github.com/purescript-lua/purescript-lua/pull/215/files#diff-241ea2421c606c31b9414fb386f9f4d1beb60055ed792935b393101edfd7b949
changelog.d/20260709_110442_unisay_objectprop_ctor_fold.mdhttps://github.com/purescript-lua/purescript-lua/pull/215/files#diff-092b6821555c7dd2d760f3f2354d752834a7f429bf6852318fed3321a5df3a65
View file https://github.com/purescript-lua/purescript-lua/blob/4f9971c699d85aac8f142436e0671d1141b6332e/changelog.d/20260709_110442_unisay_objectprop_ctor_fold.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/purescript-lua/purescript-lua/pull/215/{{ revealButtonHref }}
lib/Language/PureScript/Backend/IR/Optimizer.hshttps://github.com/purescript-lua/purescript-lua/pull/215/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
View file https://github.com/purescript-lua/purescript-lua/blob/4f9971c699d85aac8f142436e0671d1141b6332e/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/215/{{ revealButtonHref }}
https://github.com/purescript-lua/purescript-lua/pull/215/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
https://github.com/purescript-lua/purescript-lua/pull/215/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
https://github.com/purescript-lua/purescript-lua/pull/215/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
https://github.com/purescript-lua/purescript-lua/pull/215/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
https://github.com/purescript-lua/purescript-lua/pull/215/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
https://github.com/purescript-lua/purescript-lua/pull/215/files#diff-487ead9d0ca9c3e6f68e23c604b0ae9070089e0dd0f7d214cdce5fbc878f3315
test/Language/PureScript/Backend/IR/Optimizer/Spec.hshttps://github.com/purescript-lua/purescript-lua/pull/215/files#diff-241ea2421c606c31b9414fb386f9f4d1beb60055ed792935b393101edfd7b949
View file https://github.com/purescript-lua/purescript-lua/blob/4f9971c699d85aac8f142436e0671d1141b6332e/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/215/{{ revealButtonHref }}
https://github.com/purescript-lua/purescript-lua/pull/215/files#diff-241ea2421c606c31b9414fb386f9f4d1beb60055ed792935b393101edfd7b949
https://github.com/purescript-lua/purescript-lua/pull/215/files#diff-241ea2421c606c31b9414fb386f9f4d1beb60055ed792935b393101edfd7b949
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.