Title: Remove dead name-minting helpers: Lua.Name.specialNameType and Lua.Fixture.uniqueName · Issue #309 · purescript-lua/purescript-lua · GitHub
Open Graph Title: Remove dead name-minting helpers: Lua.Name.specialNameType and Lua.Fixture.uniqueName · Issue #309 · purescript-lua/purescript-lua
X Title: Remove dead name-minting helpers: Lua.Name.specialNameType and Lua.Fixture.uniqueName · Issue #309 · purescript-lua/purescript-lua
Description: Problem Two name-minting helpers in the Lua backend are exported but referenced nowhere in lib/, exe/ or test/: Language.PureScript.Backend.Lua.Name.specialNameType — builds the constant Name "$type" through the raw constructor, bypassin...
Open Graph Description: Problem Two name-minting helpers in the Lua backend are exported but referenced nowhere in lib/, exe/ or test/: Language.PureScript.Backend.Lua.Name.specialNameType — builds the constant Name "$typ...
X Description: Problem Two name-minting helpers in the Lua backend are exported but referenced nowhere in lib/, exe/ or test/: Language.PureScript.Backend.Lua.Name.specialNameType — builds the constant Name "...
Opengraph URL: https://github.com/purescript-lua/purescript-lua/issues/309
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Remove dead name-minting helpers: Lua.Name.specialNameType and Lua.Fixture.uniqueName","articleBody":"## Problem\n\nTwo name-minting helpers in the Lua backend are exported but referenced nowhere in `lib/`, `exe/` or `test/`:\n\n- `Language.PureScript.Backend.Lua.Name.specialNameType` — builds the constant `Name \"$type\"` through the raw constructor, bypassing the module's own validation (`fromText` rejects `$`, and `makeSafe` would mangle it to `_S_type`), so the value is not even a valid Lua identifier;\n- `Language.PureScript.Backend.Lua.Fixture.uniqueName` — a `MonadState Natural m ⇒ Text → m Name` counter-based minting helper, superseded by the supply in `Language.PureScript.Backend.Lua.freshName` (which additionally mangles through `makeSafe` and documents its capture-freedom contract).\n\n```haskell\n-- Lua/Name.hs — the only definition site; no use site exists\nspecialNameType ∷ Name\nspecialNameType = Name \"$type\"\n\n-- Lua/Fixture.hs — likewise unused\nuniqueName ∷ MonadState Natural m ⇒ Text → m Name\nuniqueName prefix = do\n index ← get\n modify' (+ 1)\n pure $ unsafeName (prefix \u003c> show index)\n```\n\nDead exports cost review attention (they look load-bearing, especially `specialNameType` with its invalid-identifier trick) and `uniqueName` is an attractive-nuisance duplicate of the real fresh-name supply.\n\n## Approach\n\nDelete both definitions and their export entries; the build stays green since nothing references them.\n\n\n## Prerequisites / Relations\n\nIndependent. Both helpers live in Lua-backend modules last touched by the emission-time renumbering work (#306, merged); nothing blocks this and it blocks nothing.\n\n## Verification / Measurement\n\n`grep -rn 'specialNameType\\|uniqueName' lib/ exe/ test/` finds only the definition and export sites before the change (the `uniqueName` in `IR/Uniquify.hs` is an unrelated local function); after the deletion the tree greps clean for both names and `cabal test all` stays green with no new warnings.\n","author":{"url":"https://github.com/Unisay","@type":"Person","name":"Unisay"},"datePublished":"2026-07-26T21:06:59Z","url":"https://github.com/purescript-lua/purescript-lua/issues/309"}
| 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:e57b0b28-f767-3a96-56fb-c72608ebff11 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D474:19AA62:576A00:71085C:6B00DB6A |
| html-safe-nonce | 4caea97976f3758a740f870bb1426e9d2ce00855923edf9336dd62ff0afd8dbd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENDc0OjE5QUE2Mjo1NzZBMDA6NzEwODVDOjZCMDBEQjZBIiwidmlzaXRvcl9pZCI6IjI1MDczOTMzOTY1NzQ4Mzc2MTAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 96f03bf5baf87875d6e78bad2e4fb9194bf4d3b0d5f3dddcab38fd15c10f40b3 |
| hovercard-subject-tag | issue:4982531953 |
| 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/309/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1d77c8d3a39a07cecdf813c9ad34c4ae47ceb40aeb3dc18fc7d275e654d2f5f9/purescript-lua/purescript-lua/issues/309 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1d77c8d3a39a07cecdf813c9ad34c4ae47ceb40aeb3dc18fc7d275e654d2f5f9/purescript-lua/purescript-lua/issues/309 |
| og:image:alt | Problem Two name-minting helpers in the Lua backend are exported but referenced nowhere in lib/, exe/ or test/: Language.PureScript.Backend.Lua.Name.specialNameType — builds the constant Name "$typ... |
| 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 | 043c3f30fbcbe2c6c8e729e10cbbbc90c406546f9fbbb67c648d38f6b7d16daf |
| 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 | 5425dc24e8bd8d6fca9641a12afc984825a43875 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width