`recall?` doesn't resolve names

Aperta
#16,433 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva

Direzione di ricerca

The bug is that recall? does not resolve short names inside a namespace, while recall does. Start by comparing how the two commands look up constants in the Lean 4 source, since the payload does not name a file. Reproduce with the snippet in the issue, where recall? foo fails but recall foo and recall? Foo.foo succeed. Done means recall? foo inside namespace Foo resolves like recall foo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
Prerequisites
  • Check that your issue is not already filed:
    https://github.com/leanprover/lean4/issues
  • Reduce the issue to a minimal, self-contained, reproducible test case.
    Avoid dependencies to Mathlib or Batteries.
  • Test your test case against the latest nightly release, for example on
    https://live.lean-lang.org/#project=lean-nightly
    (You can also use the settings there to switch to “Lean nightly”)
  • When reporting a perceived soundness bug: Does it affect lake check --paranoid?
    If in doubt, please reach out on [email protected] for responsible disclosure.
Description

recall? fails with "Unknown constant" unless the constant is fully qualified. Plain recall does name resolution.

Steps to Reproduce
namespace Foo
def foo : Nat := 42
recall? foo -- Error: Unknown constant `foo`
recall? Foo.foo -- Ok
recall foo -- Ok
end Foo

https://live.lean-lang.org/#codez=HYQwtgpgzgDiDGEAEAxA9mgUAEwgMyTwyQC4kA5EAF1IF4kAWAJkwCcJ4QAbLgfkIxsO3PqgwA6IlgjBsYtEA&project=lean-nightly

Versions

Lean 4.37.0-nightly-2026-11-11
Target: x86_64-unknown-linux-gnu Linux

Impact

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

Lingua principale
Lean
Stelle
10.3k
Fork
1.1k
Merge medio
19h 8m
PR unite (30g)
421

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di leanprover/lean4

Tutte le issue di leanprover/lean4

Issue simili

Altre issue su DevTools

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.