Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: show expected type in instance declarations #6619

Open
alok opened this issue Jan 13, 2025 · 0 comments
Open

RFC: show expected type in instance declarations #6619

alok opened this issue Jan 13, 2025 · 0 comments
Labels
P-medium We may work on this issue if we find the time RFC Request for comments

Comments

@alok
Copy link
Contributor

alok commented Jan 13, 2025

Proposal

2025-01-12-22-57-22

(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.

2025-01-12-22-57-38

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.

@alok alok added the RFC Request for comments label Jan 13, 2025
@leanprover-bot leanprover-bot added the P-medium We may work on this issue if we find the time label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-medium We may work on this issue if we find the time RFC Request for comments
Projects
None yet
Development

No branches or pull requests

2 participants