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

Hover information for definitions using parameters is misleading #275

Open
eric-wieser opened this issue Jun 21, 2021 · 2 comments
Open

Comments

@eric-wieser
Copy link
Contributor

Hovering over the Gᵣ in the first #check Gᵣ in this code suggests that G is an explicit argument, even though #check tells me it is implicit.

import group_theory.subgroup
import data.int.cast

section

parameters {G : Type*} [ring G]

parameters (G)

def Gᵣ (r : ℤ) : add_subgroup G := add_subgroup.closure {r}



#check Gᵣ  -- Gᵣ : ℤ → add_subgroup G

end

#check Gᵣ -- Gᵣ : Π (G : Type u_1) [_inst_1 : ring G], ℤ → add_subgroup G

image

@gebner
Copy link
Member

gebner commented Jun 21, 2021

This is a bug in core Lean, the vscode extension is just printing what it gets from the server. And I fear it will stay this way for eternity. Lean 3 development has effectively ceased, and parameters were deprecated anyhow.

@eric-wieser
Copy link
Contributor Author

This only came up because some of my old code I was trying to upgrade used parameters, and I couldn't work out why vscode was telling me the wrong thing. I guess I'll just try to strip them out entirely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants