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

feat: hover / go-to-def for attribute cmd #3896

Merged
merged 1 commit into from
Apr 13, 2024

Conversation

digama0
Copy link
Collaborator

@digama0 digama0 commented Apr 13, 2024

attribute [attr] foo was missing a hover on foo.

@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Apr 13, 2024
else
throwUnknownConstant name
let declName ← ensureNonAmbiguous ident declNames
try some <$> realizeGlobalConst ident
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we have realizeGlobalConstWithInfo or the like?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The FIXME in this code is because we are using realizeGlobalConst even though sometimes it's not a valid declaration but a simproc instead. So some of the code from these functions is inlined here to ensure the error handling is done right.

I think it would be possible to use realizeGlobalConstWithInfos here and only do the ambiguity handling separately, although it has slightly different error behavior.

@nomeata nomeata added this pull request to the merge queue Apr 13, 2024
Merged via the queue into leanprover:master with commit fb82428 Apr 13, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants