Title: docs: close out the GHC-style Note pass (#44) by Unisay · Pull Request #130 · purescript-lua/purescript-lua · GitHub
Open Graph Title: docs: close out the GHC-style Note pass (#44) by Unisay · Pull Request #130 · purescript-lua/purescript-lua
X Title: docs: close out the GHC-style Note pass (#44) by Unisay · Pull Request #130 · purescript-lua/purescript-lua
Description: Summary The final #44 batch. It adds the one remaining low-priority Note that earns its keep and makes a conscious call on the rest, so the issue's "decide consciously rather than by omission" goal is met for every listed item. Comments only, so generated code, goldens, and eval oracles are unchanged. Closes #44. Added Note [IR is assumed well-typed] in IR.Optimizer. The optimizer trusts the type checker rather than re-checking: constantFolding rewrites Eq True b to b because b must be a Bool, and betaReduce substitutes an argument for a parameter without checking the types match. Cited from both rewrites. Conscious calls on the rest Left as adequate inline documentation (a titled Note would add ceremony without a second citation site): InternalIdentData (Names) already has a complete Haddock. "Prim is always imported" (Backend.IR.mkImports) has a one-line comment explaining the always-add-then-DCE approach; it is a single site. unsafePerformIO in PSString.decodeString already carries the standard safety argument. The case-alternatives ASCII diagram lives in the IR spec; it is test-local and fine where it is. Deliberately not retitled, to avoid divergence from upstream purs: The remaining CoreFn.Laziness prose (the full delay/force rules, the USE-INIT/USE-USE/USE-IMMEDIATE derivation, and the MaxRoseTree termination argument) is thorough and only cited from within that file. Batch 3 already gave the cross-module contract (the runtime-lazy convention) and the transform a citable anchor; titling the rest would diverge from the adapted upstream source for marginal benefit. Note discovered along the way @inline never does not currently veto inlining (documented in Note [Inline annotations and inlining heuristics] from the previous batch): isInlinableExpr treats Just Never like Nothing, so a ref / small literal / single-use binding is still inlined. Flagging it here; whether never should actually veto is a behavior question for a separate change, not this docs pass. 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 The final #44 batch. It adds the one remaining low-priority Note that earns its keep and makes a conscious call on the rest, so the issue's "decide consciously rather than by omiss...
X Description: Summary The final #44 batch. It adds the one remaining low-priority Note that earns its keep and makes a conscious call on the rest, so the issue's "decide consciously rather than ...
Opengraph URL: https://github.com/purescript-lua/purescript-lua/pull/130
X: @github
Domain: github.com
| 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 | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:2b1bc96a-a0d1-e061-9af7-ceae15de29fc |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A266:3E4205:BF4CDF:10117FF:6B00F9D3 |
| html-safe-nonce | e4bbacd622b666ab377f055a06d8e09cdb9ecbd4ba05f99b5a3790ec05cf04b2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMjY2OjNFNDIwNTpCRjRDREY6MTAxMTdGRjo2QjAwRjlEMyIsInZpc2l0b3JfaWQiOiIxMjY1MDgzMTIxMzQzMTk5Njk5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 0fa04b7c363e227031e8c7360c5f9f72869af6ad1cd6673384f1c8867fb887ce |
| hovercard-subject-tag | pull_request:3937513703 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/purescript-lua/purescript-lua/pull/130/files |
| twitter:image | https://avatars.githubusercontent.com/u/1009751?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1009751?s=400&v=4 |
| og:image:alt | Summary The final #44 batch. It adds the one remaining low-priority Note that earns its keep and makes a conscious call on the rest, so the issue's "decide consciously rather than by omiss... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | e208d86428ec00a57ade75058166297440e8128a01e5287c31a53dc042bbf187 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| 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 |
Links:
Viewport: width=device-width