Title: Codegen: dropped unused parameters make call sites trip lua-language-server `redundant-parameter` · Issue #273 · purescript-lua/purescript-lua · GitHub
Open Graph Title: Codegen: dropped unused parameters make call sites trip lua-language-server `redundant-parameter` · Issue #273 · purescript-lua/purescript-lua
X Title: Codegen: dropped unused parameters make call sites trip lua-language-server `redundant-parameter` · Issue #273 · purescript-lua/purescript-lua
Description: Problem Found while linting pslua-generated Lua in a downstream application (OpenResty, with luacheck and lua-language-server). Cosmetic only: the code runs and passes luac -p. Re-confirmed on current main. Instance methods whose paramet...
Open Graph Description: Problem Found while linting pslua-generated Lua in a downstream application (OpenResty, with luacheck and lua-language-server). Cosmetic only: the code runs and passes luac -p. Re-confirmed on curr...
X Description: Problem Found while linting pslua-generated Lua in a downstream application (OpenResty, with luacheck and lua-language-server). Cosmetic only: the code runs and passes luac -p. Re-confirmed on curr...
Opengraph URL: https://github.com/purescript-lua/purescript-lua/issues/273
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Codegen: dropped unused parameters make call sites trip lua-language-server `redundant-parameter`","articleBody":"## Problem\n\nFound while linting pslua-generated Lua in a downstream application (OpenResty, with luacheck and lua-language-server). Cosmetic only: the code runs and passes `luac -p`. Re-confirmed on current `main`.\n\nInstance methods whose parameters are unused emit a function with fewer parameters than the class-method call site passes. The canonical case is `IsSymbol`: for a concrete symbol the instance is `reflectSymbol _ = \"tail\"`, which compiles to a zero-parameter function, while the call site keeps the uniform convention and passes the `Proxy`:\n\n```lua\nreflectSymbol = function() return \"tail\" end -- definition: 0 params\n-- …\nlocal key = dictIsSymbol.reflectSymbol(Type_Proxy_Proxy) -- call site: 1 arg\n```\n\nLua discards the extra argument, so this runs fine, but lua-language-server flags `redundant-parameter` at every such call site, and there are many. Present in the `Golden.GenericEqTwoTypes` and `Golden.BugListGenericEq` output. Low priority, language-server noise only.\n\n## Approach\n\nEither keep a placeholder `_` parameter so the definition arity matches the call convention, or narrow the call site to the real arity.\n\n## Prerequisites / Relations\n\nRelates to #275 (shared unused-parameter / dead-argument handling; non-blocking).\n\n## Verification / Measurement\n\nlua-language-server reports no `redundant-parameter` on the affected golden outputs (`Golden.GenericEqTwoTypes`, `Golden.BugListGenericEq`).\n\n## Open questions\n\nWhich fix direction to take: a placeholder `_` parameter on the definition, or narrowing the call site to the real arity.\n","author":{"url":"https://github.com/Unisay","@type":"Person","name":"Unisay"},"datePublished":"2026-07-14T10:52:30Z","url":"https://github.com/purescript-lua/purescript-lua/issues/273"}
| 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:00896bbd-ff22-f670-990d-20312e6a76e4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 963E:7A60E:822EED:AA6050:6B00DB6D |
| html-safe-nonce | 8024d2dcfdca853a1fc18c15f8742195e868e6dc1f938e66cc2675f2828e3d99 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NjNFOjdBNjBFOjgyMkVFRDpBQTYwNTA6NkIwMERCNkQiLCJ2aXNpdG9yX2lkIjoiNjk0MTAyOTkyNjU0Mzg3NDkyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8a8d660a8ac5efe8c6d8f5ecef6d65f4ac960a9642ca4490f4aa6b0328b9c729 |
| hovercard-subject-tag | issue:4882350371 |
| 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/273/issue_layout |
| twitter:image | https://opengraph.githubassets.com/77463d92dbe28ed89ded5d440458d96c2dde8a05303e438e1d5866465699b796/purescript-lua/purescript-lua/issues/273 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/77463d92dbe28ed89ded5d440458d96c2dde8a05303e438e1d5866465699b796/purescript-lua/purescript-lua/issues/273 |
| og:image:alt | Problem Found while linting pslua-generated Lua in a downstream application (OpenResty, with luacheck and lua-language-server). Cosmetic only: the code runs and passes luac -p. Re-confirmed on curr... |
| 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