leanprover / leanprover/lean4

`#check` should show all options on overloaded identifier

Open
#2,279 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P-medium
Dominant language
Lean
Stars
9.2k
Forks
990
Avg merge
1d 17h
Merged PRs (30d)
175

Description

The implementation of #check uses resolveGlobalConstWithInfos, which suggests that it wants to show multiple messages if a name is overloaded (which is the desired behavior). However, this does not (always) work.

import Lean.Meta
open Lean Core Meta
#print Context -- shows 2 options
#check Context -- shows only `Lean.Core.Context : Type`
-- expected to also see: `Lean.Meta.Context : Type`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Lean.Meta example with #print Context and #check Context, comparing the two displayed options. Then inspect the #check implementation and its use of resolveGlobalConstWithInfos; done means #check Context shows both Lean.Core.Context : Type and Lean.Meta.Context : Type.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.