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

Elaborator doesn't produce InfoTree for incomplete match and incomplete terms in apply #5336

Open
mhuisi opened this issue Sep 13, 2024 · 2 comments
Labels
bug Something isn't working P-medium We may work on this issue if we find the time

Comments

@mhuisi
Copy link
Contributor

mhuisi commented Sep 13, 2024

Description

In incomplete match statements and in incomplete terms in apply, the elaborator often does not produce InfoTrees.

Context

This issue is derived from #5172. #5299 resolves the fact that completion doesn't trigger in these contexts, but it doesn't resolve the underlying problem that the elaborator does not produce InfoTrees in this example, which are also needed for all kinds of other language server features.

Steps to Reproduce

Consider the following example from #5172:

set_option trace.Elab.info true

inductive Direction where
  | up
  | right
  | down
  | left
deriving Repr

def angle (d: Direction) :=
  match d with
  | Direction. => 90 
  | Direction.right => 0
  | Direction.down => 270
  | Direction.left => 180

example : p ∨ (q ∧ r) → (p ∨ q) ∧ (p ∨ r) := by
  intro h
  cases h with
  | inl hp => apply And. (Or.intro_left q hp) (Or.intro_left r hp)
  | inr hqr => apply And.intro (Or.intro_right p hqr.left) (Or.intro_right p hqr.right)

In angle, all InfoTree information for the incomplete match statement is missing. In the example, all InfoTree information for the incomplete term in the first apply is missing.

Versions

Current master (ec98c92).

Impact

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

@mhuisi mhuisi added the bug Something isn't working label Sep 13, 2024
@Kha
Copy link
Member

Kha commented Sep 20, 2024

Related: #3831. I thought we also had one for match

@leanprover-bot leanprover-bot added the P-medium We may work on this issue if we find the time label Sep 20, 2024
@kmill
Copy link
Collaborator

kmill commented Oct 29, 2024

#5862 added info for apply, but match is still remaining.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P-medium We may work on this issue if we find the time
Projects
None yet
Development

No branches or pull requests

4 participants