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

sorry source is displayed in infoview with let #6715

Open
3 tasks done
edegeltje opened this issue Jan 20, 2025 · 0 comments
Open
3 tasks done

sorry source is displayed in infoview with let #6715

edegeltje opened this issue Jan 20, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@edegeltje
Copy link

edegeltje commented Jan 20, 2025

Prerequisites

Please put an X between the brackets as you perform the following steps:

Description

When using let, the source of a sorry is displayed in the infoview despite the pp.sorrySource option being false.

Context

The bug was noticed by @kmill on zulip, when i asked if the displayed [anonymous] for the source of a sorry inside a let should rather display a more readable value.

Steps to Reproduce

  1. Paste the following code at live.lean-lang.org with Lean Nightly:
  let n : Nat := sorry
  -- hover here
  trivial
  1. Hover at the comment, and look at the infoview for the assigned value of n.

Expected behavior:

The value of n is displayed as n : Nat := sorry.

Actual behavior:

The value of n is displayed as n : Nat := sorry «[anonymous]:2:17»`.

Versions

Lean 4.16.0-nightly-2025-01-20
Target: x86_64-unknown-linux-gnu

Additional Information

The lean playground uses (as of writing) no module name, which causes the source of the sorry to display as [anonymous] rather than something more useful like foo or foo.n. This bug or lack of feature is not part of this issue.

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

@edegeltje edegeltje added the bug Something isn't working label Jan 20, 2025
@kmill kmill self-assigned this Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants