RFC: unused variables linter should lint against unused typeclass arguments
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 9.2k
- Forks
- 990
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 175
Description
Proposal
The following code does not cause an unused variable warning.
example [Inhabited Nat] : 0 = 0 := rfl
This is a reasonably common defect in the standard library, and it would be great if we had a linter for it. As usual it should be possible the linter by using a construct like [_ : Inhabited Nat].
Impact
Add 👍 to issues you consider important. If others benefit from the changes in this proposal being added, please ask them to add 👍 to it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the unused variables linter and the code that handles typeclass arguments. Reproduce the example with [Inhabited Nat] and compare it with the explicit [_ : Inhabited Nat] form. Done means unused typeclass arguments produce warnings while explicitly named underscore arguments suppress them.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100