RFC: show expected type in instance declarations
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 9.2k
- Forks
- 990
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 175
Description
Proposal
(This may be more appropriate in the vscode-lean4 repo?)
In the pic above, putting the cursor on toString does not show the expected type, but hovering does. However, for defs that are not instance implementations, putting the cursor on the identifier will show the expected type as in the following picture.
I propose that it show should the expected type even in instance declarations.
- User Experience: How does this feature improve the user experience?
Easier to see what a function is doing, and anyway hovering shows that type info.
- Beneficiaries: Which Lean users and projects benefit most from this feature/change?
New users, people who don't want to keep stuff in their head.
- Maintainability: Will this change streamline code maintenance or simplify its structure?
Dunno.
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 from the issue's examples and screenshots, then determine whether the behavior belongs in lean4 or vscode-lean4 as suggested. The work is done when placing the cursor on an identifier in an instance declaration shows its expected type, matching the behavior described for non-instance definitions.
Written by the indexing model from the issue text.
Assessment
- Domain
- developer-experience
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100