Title: Extend the default directive pack to foldable-traversable and enums · Issue #331 · purescript-lua/purescript-lua · GitHub
Open Graph Title: Extend the default directive pack to foldable-traversable and enums · Issue #331 · purescript-lua/purescript-lua
X Title: Extend the default directive pack to foldable-traversable and enums · Issue #331 · purescript-lua/purescript-lua
Description: Problem The default directive pack (#242) covers the prelude fork plus the generics glue and the ST/Ref modify wrappers. The corpus still shows dictionary-parameterized residuals from other core forks: Data.Foldable.foldableArray field r...
Open Graph Description: Problem The default directive pack (#242) covers the prelude fork plus the generics glue and the ST/Ref modify wrappers. The corpus still shows dictionary-parameterized residuals from other core fo...
X Description: Problem The default directive pack (#242) covers the prelude fork plus the generics glue and the ST/Ref modify wrappers. The corpus still shows dictionary-parameterized residuals from other core fo...
Opengraph URL: https://github.com/purescript-lua/purescript-lua/issues/331
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Extend the default directive pack to foldable-traversable and enums","articleBody":"## Problem\n\nThe default directive pack (#242) covers the prelude fork plus the generics glue and the ST/Ref `modify` wrappers. The corpus still shows dictionary-parameterized residuals from other core forks: `Data.Foldable.foldableArray` field reads and the `Data.String.CodePoints` enum machinery (`boundedEnumCodePoint.toEnum`/`fromEnum`) survive in several goldens. The Foldable/Traversable member accessors (`foldl`, `foldr`, `foldMap`, `traverse`, `sequence`) and the `Data.Enum` combinators are exactly the accessor shape the pack force-inlines for the prelude classes, so folds and traversals over concrete structures stop specializing one library short of the prelude's treatment.\n\n## Approach\n\nExtend the pack entry-by-entry with the same empirical loop that calibrated #242 in PR #327: add a candidate entry, regenerate the structural goldens, keep the entry only if the corpus shrinks or holds everywhere and every eval golden stays byte-identical, drop it on any regression. Candidates in leaning order: the Foldable/Traversable member accessors at `arity=1`, then `Data.Enum`'s accessors and small combinators. Where corpus coverage is thin, add a focused golden first (the `Golden.DirectivePack` module is the template).\n\n## Prerequisites / Relations\n\nFollow-up to #242 / PR #327. Ideally after #330 (the monotone pack tier), which removes the risk that an accessor entry pessimizes sites the heuristics currently win — the calibration in #327 had to drop entries for exactly that reason.\n\n## Verification / Measurement\n\nPer accepted entry: corpus golden.lua total does not grow, at least one golden demonstrably improves, eval goldens unchanged; the headline delta reported through the bench harness (#172).\n","author":{"url":"https://github.com/Unisay","@type":"Person","name":"Unisay"},"datePublished":"2026-07-28T10:16:15Z","url":"https://github.com/purescript-lua/purescript-lua/issues/331"}
| 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 | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:48c42963-51a1-a544-29be-1d316bdca692 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ABC0:2AAD2E:6B0955:90EF6A:6B00D92D |
| html-safe-nonce | 47cd7a5c1e57d2df697d6f19fd75ca165b7e7c522cf47e99c2d264cc00d6a38e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQkMwOjJBQUQyRTo2QjA5NTU6OTBFRjZBOjZCMDBEOTJEIiwidmlzaXRvcl9pZCI6IjY4Mzg1MTU3Nzg4MTIxNzI1ODkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1b6b8f43d79d0e2b16e702dc57dca0a6e9c8ce14d4a524b0c504de25ee6b305e |
| hovercard-subject-tag | issue:4997437103 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/purescript-lua/purescript-lua/331/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ff62660a3e2e2ed407dcdcc31fd8a6e9863651f4ecc75df1141ce76a670e8f1f/purescript-lua/purescript-lua/issues/331 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ff62660a3e2e2ed407dcdcc31fd8a6e9863651f4ecc75df1141ce76a670e8f1f/purescript-lua/purescript-lua/issues/331 |
| og:image:alt | Problem The default directive pack (#242) covers the prelude fork plus the generics glue and the ST/Ref modify wrappers. The corpus still shows dictionary-parameterized residuals from other core fo... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Unisay |
| hostname | github.com |
| expected-hostname | github.com |
| None | a481f62a1e04c9b9bdcb5628230682c66d59006f5b13b080f79cba84a176905b |
| turbo-cache-control | no-preview |
| 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 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 84c8c5cc25e2fb7f2308428458538436baecc6d2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width